forked from mtusi2026/mtusi2026lab2
22 lines
515 B
Python
22 lines
515 B
Python
from __future__ import annotations
|
|
|
|
from fastapi import APIRouter, status
|
|
|
|
from app.schemas import HealthResponse
|
|
|
|
router = APIRouter(tags=["health"])
|
|
|
|
|
|
@router.get(
|
|
"/health/live", response_model=HealthResponse, status_code=status.HTTP_200_OK
|
|
)
|
|
async def health_live() -> HealthResponse:
|
|
return HealthResponse(status="ok")
|
|
|
|
|
|
@router.get(
|
|
"/health/ready", response_model=HealthResponse, status_code=status.HTTP_200_OK
|
|
)
|
|
async def health_ready() -> HealthResponse:
|
|
return HealthResponse(status="ok")
|