From e4643f05a53d5efcb0a1a69465f706d6d6fa389e Mon Sep 17 00:00:00 2001 From: Alan Chamathil <77508072+AlanChamathil@users.noreply.github.com> Date: Mon, 27 Mar 2023 11:48:27 +0100 Subject: [PATCH] Fixed retrieving notifications --- src/routes/notification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/notification.js b/src/routes/notification.js index 2c0849e..cc5c15f 100644 --- a/src/routes/notification.js +++ b/src/routes/notification.js @@ -20,7 +20,7 @@ router.get("/info/:id",(req,res) =>{ // grab the userid // retrieve all the notifcations stored in the database - Notification.findById(req.params.id).then((notifiaction) => { + Notification.find({userid:req.params.id}).then((notifiaction) => { if(!notifiaction){ return res.status(404).send(); } -- GitLab