Skip to content

Commit f82eafe

Browse files
feat: Update mark as read API notification method
1 parent e50fad1 commit f82eafe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

HTTPS/notifications.route.http

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0OGY1MWZkN
1010

1111
// mark single or all notifications as read
1212

13-
POST http://localhost:5000/private/notifications/mark-as-read
13+
PUT http://localhost:5000/private/notifications/mark-as-read
1414
Content-Type: application/json
1515
# Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0OGY0OTU0OTZlOGJlNTI2NmYyZDY5OCIsImlhdCI6MTY4NzM4NjY0NSwiZXhwIjoxNjg3NDczMDQ1fQ.0g4cOnj_TQQ5uof9y4q-9IR8mb9-k6eAT3DBOu7ZIYc # Souvik
1616
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0OGY1MWZkNDRhY2MzYTdjMzM1Zjc1YyIsImlhdCI6MTY4NzM4ODgwMSwiZXhwIjoxNjg3NDc1MjAxfQ.FDhY4o_986RwkNvVQ8WjHh_LwU8P9wPibShECRIlpQQ

routes/private/notifications.route.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
const router = express.Router()
99

1010
router.route('/get-all').get(getAllNotifications)
11-
router.route('/mark-as-read').post(markAsRead)
11+
router.route('/mark-as-read').put(markAsRead)
1212
router.route("/recent-notifications").get(getRecentNotifications) // this will fetch recet 10 unread notifications
1313

1414
export default router

0 commit comments

Comments
 (0)