Profile PATCH Ignores a Zero Quota
Level 1 · node · Correctness · Falsy value partial-update error
Scenario
An admin profile API updates only fields supplied by the caller. Setting quota to zero should disable usage, but the previous value remains while positive changes work. Controller, service, and repository are separated.
Requirements
- If PATCH includes quota, persist zero as a valid value - If quota is omitted, preserve the existing value - Preserve displayName updates - Return null for a missing user - Do not affect other users
Acceptance criteria
- Quota can be changed to a positive value
- Quota can be changed to zero
- Omitting quota preserves its value
- Only displayName can be changed
- A missing user returns null