feat: implement full API - all admin/user routes, RBAC, sync service, collector, MySQL config, superadmin hanbin credentials
9d66536 Download app/schemas/user/auth.py from binhugg2/api: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/spaces/binhugg2/api/resolve/main/app/schemas/user/auth.py
- Command line
-
hf download hf://spaces/binhugg2/api/app/schemas/user/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/binhugg2/api/resolve/main/app/schemas/user/auth.py
621 Bytes
| from datetime import datetime | |
| from pydantic import BaseModel, Field | |
| class UserRegisterRequest(BaseModel): | |
| username: str = Field(..., min_length=3, max_length=30) | |
| password: str = Field(..., min_length=6, max_length=50) | |
| email: str | None = None | |
| nickname: str | None = None | |
| class UserLoginRequest(BaseModel): | |
| username: str | |
| password: str | |
| class UserLoginResponse(BaseModel): | |
| accessToken: str | |
| expires_in: int = 1440 | |
| class UserProfileResponse(BaseModel): | |
| id: int | |
| username: str | None | |
| email: str | None | |
| nickname: str | None | |
| avatar: str | None | |
| created_at: datetime | |