2026-02-01 13:57:30 +00:00

13 lines
285 B
Python

from fastapi import APIRouter, HTTPException
from app.services.db import health_check
router = APIRouter()
@router.get("/health")
def health():
if not health_check():
raise HTTPException(status_code=503, detail="db_unavailable")
return {"status": "ok", "db": "ok"}