controller.py 471 B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. from fastapi import APIRouter
  3. from fastapi.responses import JSONResponse
  4. HealthRouter = APIRouter(prefix="", tags=["健康检查"])
  5. @HealthRouter.get("/health", summary="健康检查", description="检查系统健康状态")
  6. async def health_check() -> JSONResponse:
  7. """
  8. 健康检查接口
  9. 返回:
  10. - JSONResponse: 包含健康状态的JSON响应
  11. """
  12. return JSONResponse(content={"msg": "Healthy"}, status_code=200)