hesabixArc/hesabixAPI/adapters/api/v1/health.py

31 lines
713 B
Python
Raw Normal View History

2025-09-15 13:53:54 +03:30
from fastapi import APIRouter
2025-09-21 20:31:52 +03:30
from adapters.api.v1.schemas import SuccessResponse
2025-09-15 13:53:54 +03:30
router = APIRouter(prefix="/health", tags=["health"])
2025-09-20 01:17:27 +03:30
@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"
}
}
}
}
}
}
)
2025-09-15 13:53:54 +03:30
def health() -> dict[str, str]:
return {"status": "ok"}