feat: add PATCH /user/settings/password endpoint for changing password
Register the fixed /password route before the wildcard /{option} to
prevent FastAPI from matching it as a path parameter.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,16 @@ class BindIdentityRequest(SQLModelBase):
|
||||
"""OAuth 回调地址"""
|
||||
|
||||
|
||||
class ChangePasswordRequest(SQLModelBase):
|
||||
"""修改密码请求 DTO"""
|
||||
|
||||
old_password: str = Field(min_length=1)
|
||||
"""当前密码"""
|
||||
|
||||
new_password: str = Field(min_length=8, max_length=128)
|
||||
"""新密码(至少 8 位)"""
|
||||
|
||||
|
||||
# ==================== 数据库模型 ====================
|
||||
|
||||
class AuthIdentity(SQLModelBase, UUIDTableBaseMixin):
|
||||
|
||||
Reference in New Issue
Block a user