from fastapi import FastAPI from sqlalchemy import text from app.db import SessionDep from app.routers import ( auth, mail_logs, mail_templates, participants, public_orders, purchase_rounds, webhooks, wine_categories, wine_offerings, ) app = FastAPI(title="Vinindkøb Admin API") app.include_router(auth.router) app.include_router(participants.router) app.include_router(purchase_rounds.router) app.include_router(wine_offerings.router) app.include_router(wine_categories.router) app.include_router(mail_templates.router) app.include_router(mail_logs.router) app.include_router(webhooks.router) app.include_router(public_orders.router) @app.get("/health") def health(session: SessionDep) -> dict: session.exec(text("SELECT 1")) return {"status": "ok", "database": "ok"}