From 5f5749ce0496a7996c19dbe8dc853574a66c79ca Mon Sep 17 00:00:00 2001 From: Apoorva Pendse <102853901+apoorvapendse@users.noreply.github.com> Date: Sat, 10 Jun 2023 22:31:49 +0530 Subject: [PATCH] added the notificationIds parameter for mark multiple notifs as read This is made to solve issue #14484 --- website/server/controllers/api-v3/notifications.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/server/controllers/api-v3/notifications.js b/website/server/controllers/api-v3/notifications.js index 8ded24d5ebd..def2158a35f 100644 --- a/website/server/controllers/api-v3/notifications.js +++ b/website/server/controllers/api-v3/notifications.js @@ -51,15 +51,17 @@ api.readNotification = { }; /** - * @api {post} /api/v3/notifications/read Mark multiple notifications as read + * @api {post} /api/v3/notifications/:notificationIds/read Mark multiple notifications as read * @apiName ReadNotifications * @apiGroup Notification * + * @apiParam (Path) {UUID} notificationIds + * * @apiSuccess {Object} data user.notifications */ api.readNotifications = { method: 'POST', - url: '/notifications/read', + url: '/notifications/:notificationIds/read', middlewares: [authWithHeaders()], async handler (req, res) { const { user } = res.locals;