Skip to content

Commit

Permalink
added the notificationIds parameter for mark multiple notifs as read
Browse files Browse the repository at this point in the history
This is made to solve issue HabitRPG#14484
  • Loading branch information
apoorvapendse committed Jun 10, 2023
1 parent 31e9100 commit 5f5749c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/server/controllers/api-v3/notifications.js
Expand Up @@ -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;
Expand Down

0 comments on commit 5f5749c

Please sign in to comment.