Assume email when creating notifications
This commit is contained in:
@@ -49,16 +49,17 @@ app.get("/items/:url", async (req, res) => {
|
||||
app.post("/marketalerts", function(req, res) {
|
||||
const { email, last_date, olx_url } = req.body;
|
||||
console.log(email, last_date, olx_url);
|
||||
//res.json({ message: "Market Alert Created!" });
|
||||
sequelize.sync().then(() =>
|
||||
MarketAlert.create({
|
||||
olx_url,
|
||||
last_date,
|
||||
email
|
||||
})
|
||||
res.json({ message: "Market Alert Created!" });
|
||||
);
|
||||
//res.json({ message: "Market Alert Created!" });
|
||||
sequelize.sync().then(() => {
|
||||
MarketAlert.create({
|
||||
olx_url,
|
||||
last_date,
|
||||
email
|
||||
})
|
||||
.then(() => {
|
||||
res.json({ message: "Market Alert Created!" });
|
||||
})
|
||||
.catch(e => console.error(e));
|
||||
});
|
||||
});
|
||||
|
||||
app.post("/payforalert", function(request, response) {
|
||||
|
||||
Reference in New Issue
Block a user