Skip to content

Feature/update user endpoint - #101

Open
DimaDamage91 wants to merge 4 commits into
mate-academy:mainfrom
DimaDamage91:feature/update-user-endpoint
Open

Feature/update user endpoint#101
DimaDamage91 wants to merge 4 commits into
mate-academy:mainfrom
DimaDamage91:feature/update-user-endpoint

Conversation

@DimaDamage91

Copy link
Copy Markdown

No description provided.

DimaDamage91 and others added 4 commits August 24, 2026 13:00
Follows the existing getUserById pattern: returns undefined when the id doesn't exist, or the mutated user otherwise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Validates that name and email are non-empty strings before touching the store, so a bad body 400s even for an id that exists. Falls back to 404 when the store returns no user (covers both an unknown id and a non-numeric one).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Self-review caught that the store received the raw (untrimmed) values even though validation checked the trimmed ones, so whitespace-padded input was persisted verbatim. Also hoisted the isFilledString check to module scope so it isn't recreated on every request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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