Files
old-web/app/controllers/unsubscribe.js

15 lines
388 B
JavaScript
Raw Normal View History

const { currentSearchRequest } = require("../helpers/url");
const getUnsubscribe = async (req, res) => {
2019-09-05 11:14:54 +02:00
const title = "Uspješno ste se odjavili";
const searchRequest = await currentSearchRequest(req);
searchRequest.subscribed = false;
await searchRequest.save();
2019-07-11 14:25:38 +02:00
2019-09-05 11:14:54 +02:00
res.render("unsubscribe", { nextStep: "/vrstanekretnine", title });
};
module.exports = {
2019-09-05 11:14:54 +02:00
getUnsubscribe
};