feat: implement PATCH /user/settings/{option} and fix timezone range to UTC-12~+14

- Add SettingOption StrEnum (nickname/language/timezone) for path param validation
- Add UserSettingUpdateRequest DTO with Pydantic constraints
- Implement endpoint: extract value by option name, validate non-null for required fields
- Fix timezone upper bound from 12 to 14 (UTC+14 exists, e.g. Line Islands)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 20:15:35 +08:00
parent 4c1b7a8aad
commit d831c9c0d6
3 changed files with 54 additions and 11 deletions

View File

@@ -14,6 +14,8 @@ from .user import (
UserResponse,
UserSettingResponse,
UserThemeUpdateRequest,
SettingOption,
UserSettingUpdateRequest,
WebAuthnInfo,
UserTwoFactorResponse,
# 管理员DTO