Skip to content

Add validated user update endpoint - #127

Open
Gidr0Gen wants to merge 3 commits into
mate-academy:mainfrom
Gidr0Gen:add-update-user
Open

Add validated user update endpoint#127
Gidr0Gen wants to merge 3 commits into
mate-academy:mainfrom
Gidr0Gen:add-update-user

Conversation

@Gidr0Gen

@Gidr0Gen Gidr0Gen commented Sep 2, 2026

Copy link
Copy Markdown

What changed

  • add a store helper that updates a user by id
  • add PUT /users/:id with trimmed input and basic email validation
  • return clear 400 responses for invalid input and 404 for unknown users
  • document the plan, model choice, commit split, and self-review in NOTES.md

Why

The users API needs a safe update path that follows the existing store abstraction instead of mutating data in the route.

Verification

  • pnpm test — 9/9 passing
  • pnpm lint — passing

Reviewer checks

Please verify the successful update path as well as missing-field, invalid-email, and unknown-user responses.

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