Repository navigation
Conversation
…e encapsulation (resolves SecureBananaLabs#13486)
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.
/claim #13486
/claim #743
/claim #11398
/claim #12548
/claim #13439
Title: feat(api): add GET /api/messages/:id route with 404 fallback and store encapsulation
Summary of Changes
GET /api/messages/:idonmessageRoutes.js.getMessage(req, res, next)inmessageController.jsreturning 200 with message data when found, and 404 with{ success: false, message: "Message not found" }when missing.getMessageById(id)lookup helper inmessageService.jsand wrappedlistMessages()with defensive array clone[...messages]to eliminate external mutation of the internal message repository._resetMessages()helper to ensure test idempotency across test executions."test": "node --test"inapps/api/package.jsonto fix Node 24 test runner directory execution (ref Automate Bug Detection and Reviews #11398).apps/api/src/tests/message_detail.test.jsverifying 404 fallback, 200 success, and store encapsulation. 100% test pass rate.