delete function
This commit is contained in:
@ -110,6 +110,18 @@ router.get("/shoppinglist/:sl_id", async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
//DELETE Shoppinglist
|
||||
|
||||
router.delete("/shoppinglist", async (req, res) => {
|
||||
try {
|
||||
res.status(200).send(await postgres.deleteShoppinglist(req.body.sl_id));
|
||||
}
|
||||
|
||||
catch(err) {
|
||||
res.status(400).send(await err);
|
||||
}
|
||||
});
|
||||
|
||||
router.get("/test1", (req, res) => {
|
||||
res.render("index1");
|
||||
});
|
||||
|
Reference in New Issue
Block a user