Email links now point to our URL and then redirect to the original property URL, ran prettier on the affected files

This commit is contained in:
=
2019-09-04 07:00:27 -07:00
parent 09792db21c
commit 719cf4d8f9
4 changed files with 335 additions and 226 deletions

View File

@@ -0,0 +1,16 @@
const { getMarketAlertById } = require("../helpers/db/dbHelper");
const redirect = async (req, res) => {
const id = req.params["id"];
const marketAlert = await getMarketAlertById(id);
if (marketAlert) {
res.redirect(marketAlert.url);
} else {
res.send("Not found");
res.end();
}
};
module.exports = {
redirect
};