from __future__ import annotations

from fastapi import APIRouter, Request

from app.core.health import build_health_report, build_ready_response


router = APIRouter()


@router.get("/health")
async def health(request: Request) -> dict:
    return await build_health_report(request.app)


@router.get("/ready")
async def ready(request: Request):
    return await build_ready_response(request.app)
