hesabixArc/hesabixAPI/adapters/api/v1/health.py
2025-09-21 20:31:52 +03:30

31 lines
713 B
Python

from fastapi import APIRouter
from adapters.api.v1.schemas import SuccessResponse
router = APIRouter(prefix="/health", tags=["health"])
@router.get("",
summary="بررسی وضعیت سرویس",
description="بررسی وضعیت کلی سرویس و در دسترس بودن آن",
response_model=SuccessResponse,
responses={
200: {
"description": "سرویس در دسترس است",
"content": {
"application/json": {
"example": {
"success": True,
"message": "سرویس در دسترس است",
"data": {
"status": "ok",
"timestamp": "2024-01-01T00:00:00Z"
}
}
}
}
}
}
)
def health() -> dict[str, str]:
return {"status": "ok"}