Skip to content

Add PUT /users/:id endpoint to update a user - #88

Open
teovaira wants to merge 3 commits into
mate-academy:mainfrom
teovaira:update-user-endpoint
Open

Add PUT /users/:id endpoint to update a user#88
teovaira wants to merge 3 commits into
mate-academy:mainfrom
teovaira:update-user-endpoint

Conversation

@teovaira

Copy link
Copy Markdown

Summary

  • Adds PUT /users/:id to update an existing user's name and email
  • Adds an updateUser helper in db/store.js that the new route calls
  • Follows the same validation/not-found patterns already used by POST /users and GET /users/:id

Test plan

  • npm test passes (9/9)
  • PUT /users/:id with a valid name+email on an existing user returns 200 with the updated fields
  • PUT /users/:id on a non-existent id returns 404
  • PUT /users/:id with a missing name or email returns 400
  • Existing GET/POST/health routes are unaffected

🤖 Generated with Claude Code

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