feat: add update user endpoint - #126
Open
emay2026 wants to merge 6 commits into
Open
Conversation
mateacademy-ai-mentor
approved these changes
Sep 2, 2026
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation fully meets all task requirements. The PUT /users/:id endpoint correctly handles all three success paths: it returns 400 when name or email are missing, 404 when the user doesn't exist, and 200 with the updated user on success. The code properly leverages the db/store.js updateUser helper and follows existing patterns throughout. All 9 tests pass, confirming no regressions. NOTES.md contains meaningful documentation covering your approach, model choice, and review findings. This is a solid implementation—you're clear to merge.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
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.
This PR implements the PUT /users/:id endpoint to allow updating existing users.
Changes
Testing
Run
✔ NOTES.md exists at the project root (0.820417ms)
✔ NOTES.md has real content (0.436ms)
✔ PUT /users/:id updates an existing user (28.9385ms)
✔ PUT /users/:id returns 404 for a user that does not exist (2.637417ms)
✔ PUT /users/:id with a missing field returns 400 (2.539834ms)
✔ GET /health returns ok (16.754291ms)
✔ GET /users returns a list of users (4.866125ms)
✔ GET /users/:id returns 404 for a user that does not exist (3.02075ms)
✔ POST /users with no body returns 400 (6.367041ms)
ℹ tests 9
ℹ suites 0
ℹ pass 9
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 268.492458 to verify. Specifically, the following cases are covered: