Repository navigation
fix(frontend): use PATCH /notifications/read-all for mark-all-read - #1805
Open
rahmangamer12 wants to merge 2 commits into
Open
rahmangamer12 wants to merge 2 commits into
rahmangamer12 wants to merge 2 commits into
Conversation
The backend exposes PATCH /notifications/read-all, but the client called /notifications/mark-all-read, which 404s. Fixes DistinctCodes#1757.
|
@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1757
Problem
notificationsApiClient.markAllRead()calledPATCH /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 checksmarkAllReadhits/notifications/read-allandmarkReadhits/notifications/:id/read.No backend changes. One-line fix plus a regression test.