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

View file

@ -11,11 +11,16 @@ from routes import audit as audit_routes
from routes import profile as profile_routes
from routes import invites as invites_routes
from routes import auth as auth_routes
from routes import meta as meta_routes
from validate_constants import validate_shared_constants
@asynccontextmanager
async def lifespan(app: FastAPI):
"""Create database tables on startup."""
"""Create database tables on startup and validate constants."""
# Validate shared constants match backend definitions
validate_shared_constants()
async with engine.begin() as conn:
await conn.run_sync(Base.metadata.create_all)
yield
@ -39,3 +44,4 @@ app.include_router(audit_routes.router)
app.include_router(profile_routes.router)
app.include_router(invites_routes.router)
app.include_router(invites_routes.admin_router)
app.include_router(meta_routes.router)