Добавить балансировку и защиту от дублей сообщений

This commit is contained in:
2026-10-27 21:47:07 +03:00
parent 0ab3a341aa
commit d942679e5c
37 changed files with 1289 additions and 16 deletions
+14
View File
@@ -0,0 +1,14 @@
from fastapi import APIRouter, Request
from app.api.serialize import user_out
from app.core.security import hash_password
from app.schemas import CreateUser
router = APIRouter()
@router.post('/api/v1/users', status_code=201)
async def register(body: CreateUser, request: Request):
row = await request.app.state.storage.create_user(
body.username, body.display_name, hash_password(body.password))
return user_out(row)