health.py 355 B

12345678910111213141516171819
  1. from fastapi import APIRouter
  2. from pydantic import BaseModel
  3. from schemas import ResponseWrapper
  4. router = APIRouter()
  5. @router.get("/health", response_model=ResponseWrapper)
  6. async def health_check():
  7. """健康检查接口"""
  8. return ResponseWrapper(
  9. status_code=200,
  10. detail="success",
  11. data={"status": "healthy"}
  12. )