feat: Add user profile management and password change endpoints
This commit is contained in:
@@ -79,3 +79,22 @@ class ApiTokenStatusResponse(BaseModel):
|
||||
has_token: bool = Field(..., description="Whether user has an active API token")
|
||||
expires_at: datetime | None = Field(None, description="Token expiration timestamp")
|
||||
is_expired: bool = Field(..., description="Whether the token is expired")
|
||||
|
||||
|
||||
class ChangePasswordRequest(BaseModel):
|
||||
"""Schema for password change request."""
|
||||
|
||||
current_password: str | None = Field(None, description="Current password (required if user has existing password)")
|
||||
new_password: str = Field(
|
||||
...,
|
||||
min_length=8,
|
||||
description="New password (minimum 8 characters)",
|
||||
)
|
||||
|
||||
|
||||
class UpdateProfileRequest(BaseModel):
|
||||
"""Schema for profile update request."""
|
||||
|
||||
name: str | None = Field(
|
||||
None, min_length=1, max_length=100, description="User display name"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user