implemented

This commit is contained in:
counterweight 2025-12-20 23:06:05 +01:00
parent a31bd8246c
commit d3638e2e69
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
18 changed files with 1643 additions and 120 deletions

18
backend/routes/meta.py Normal file
View file

@ -0,0 +1,18 @@
"""Meta endpoints for shared constants."""
from fastapi import APIRouter
from models import Permission, InviteStatus, ROLE_ADMIN, ROLE_REGULAR
from schemas import ConstantsResponse
router = APIRouter(prefix="/api/meta", tags=["meta"])
@router.get("/constants", response_model=ConstantsResponse)
async def get_constants() -> ConstantsResponse:
"""Get shared constants for frontend/backend synchronization."""
return ConstantsResponse(
permissions=[p.value for p in Permission],
roles=[ROLE_ADMIN, ROLE_REGULAR],
invite_statuses=[s.value for s in InviteStatus],
)