feat: Add user profile management and password change endpoints
Some checks failed
Backend CI / lint (push) Failing after 4m51s
Backend CI / test (push) Successful in 3m38s

This commit is contained in:
JSC
2025-08-09 23:43:20 +02:00
parent 9e07ce393f
commit 0a8b50a0be
4 changed files with 195 additions and 0 deletions

View File

@@ -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"
)