Skip to content

fix(frontend): use PATCH /notifications/read-all for mark-all-read - #1805

Open
rahmangamer12 wants to merge 2 commits into
DistinctCodes:mainfrom
rahmangamer12:fix/notifications-read-all-route
Open

rahmangamer12 wants to merge 2 commits into
DistinctCodes:mainfrom
rahmangamer12:fix/notifications-read-all-route

Conversation

@rahmangamer12

Copy link
Copy Markdown

Fixes #1757

Problem

notificationsApiClient.markAllRead() called PATCH /notifications/mark-all-read, but the backend controller only exposes @Patch('read-all') (backend/src/notifications/notifications.controller.ts). The request 404s, so "Mark all as read" never works.

Change

  • frontend/lib/api/notifications.ts: call /notifications/read-all.
  • frontend/__tests__/notifications-api.test.ts: new jest test that mocks the API client and checks markAllRead hits /notifications/read-all and markRead hits /notifications/:id/read.

No backend changes. One-line fix plus a regression test.

The backend exposes PATCH /notifications/read-all, but the client called /notifications/mark-all-read, which 404s. Fixes DistinctCodes#1757.
@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

@rahmangamer12 is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Mark all as read' calls /notifications/mark-all-read, but the backend route is /notifications/read-all

1 participant