增加修改用户名

This commit is contained in:
2026-07-14 11:18:28 +08:00
parent 5b937f652b
commit 21ff42653c
2 changed files with 16 additions and 0 deletions
+4
View File
@@ -28,6 +28,10 @@ class ChangePasswordRequest(BaseModel):
new_password: str = Field(..., min_length=6, description="新密码,至少6位")
class ChangeUsernameRequest(BaseModel):
new_username: str = Field(..., min_length=1, max_length=10, description="新用户名,1-10位")
class TokenResponse(BaseModel):
access_token: str
token_type: str = "bearer"