Skip to content

Add update-user endpoint - #31

Open
GMShannon99 wants to merge 4 commits into
mate-academy:mainfrom
GMShannon99:main
Open

Add update-user endpoint#31
GMShannon99 wants to merge 4 commits into
mate-academy:mainfrom
GMShannon99:main

Conversation

@GMShannon99

Copy link
Copy Markdown

Implemented PUT /users/:id endpoint with input validation and 404 handling. All tests (including existing ones) are passing.

GMShannon99 and others added 4 commits July 4, 2026 00:26
Mirrors createUser's style: looks up via getUserById, returns
undefined if not found, otherwise mutates name/email in place.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Validates name/email are present (400), 404s for unknown ids,
otherwise updates the user via store.updateUser and returns 200.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Recorded what the pre-PR review caught (truthy-only validation,
duplicated id/validation/404 blocks) and why they were left as-is —
they match this repo's existing conventions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add PUT /users/:id endpoint to update a user
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.

1 participant