Files
FastapiAdmin/backend/app/api/v1/module_common/health/controller.py
T
zhangtao dc4d6822c7 fix(security): 将OAuth2表单的regex参数改为pattern
refactor(scheduler): 重构任务调度器并添加分布式锁支持
test: 重构测试文件结构并添加健康检查测试
style(schema): 统一将example字段改为examples
chore: 清理无用的测试文件
2025-12-09 22:25:47 +08:00

17 lines
471 B
Python

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