Backend finished

Co-authored-by: Álvaro <alvaro6gv@users.noreply.github.com>
This commit is contained in:
2025-11-10 19:49:26 +01:00
parent a2e823c4c3
commit d2f3cad487
18 changed files with 330 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
from pydantic import BaseModel, Field
from typing import Optional
# POST /login
class UserLogin(BaseModel):
user_name: str
password: str
# POST /register
class UserRegister(BaseModel):
user_name: str
password: str
# POST /2fa
class User2FA(BaseModel):
user_name: str
pre_auth_token: str
totp_code: str
# POST /enable-2fa
class Token2FA(BaseModel):
token: str
# GET /users
# GET /users/{user_id}
class UserRead(BaseModel):
user_id: int
user_name: str
class Config:
from_attributes = True