adapt unsubscribe step for new DB design
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
const { currentRERequest } = require("../helpers/url");
|
const { currentSearchRequest } = require("../helpers/url");
|
||||||
|
|
||||||
const getUnsubscribe = async (req, res) => {
|
const getUnsubscribe = async (req, res) => {
|
||||||
const title = "Uspješno ste se odjavili";
|
const title = "Uspješno ste se odjavili";
|
||||||
const request = await currentRERequest(req);
|
const searchRequest = await currentSearchRequest(req);
|
||||||
request.subscribed = false;
|
searchRequest.subscribed = false;
|
||||||
await request.save();
|
await searchRequest.save();
|
||||||
|
|
||||||
res.render("unsubscribe", { nextStep: "/vrstanekretnine", title });
|
res.render("unsubscribe", { nextStep: "/vrstanekretnine", title });
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user