from fastapi import APIRouter from sqlalchemy import text from app.db import engine from app.i18n import t router = APIRouter(tags=["health"]) @router.get("/health") def health() -> dict[str, str]: return {"status": "ok", "message": t("health.ok")} @router.get("/health/db") def health_db() -> dict[str, str]: with engine.connect() as conn: conn.execute(text("SELECT 1")) return {"status": "ok"}