19 lines
378 B
Python
19 lines
378 B
Python
from fastapi import APIRouter
|
|
from fastapi_cache.decorator import cache
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get(
|
|
"/health",
|
|
responses={
|
|
200: {
|
|
"description": "Is the service running?",
|
|
"content": {"application/json": {"example": {"status": "healthy"}}},
|
|
},
|
|
},
|
|
)
|
|
@cache()
|
|
async def health_check():
|
|
return {"status": "healthy"}
|