18 lines
361 B
Python
18 lines
361 B
Python
"""健康检查路由"""
|
|
from fastapi import APIRouter
|
|
|
|
from ..config import get_settings
|
|
|
|
router = APIRouter(tags=["health"])
|
|
settings = get_settings()
|
|
|
|
|
|
@router.get("/health")
|
|
async def health_check():
|
|
"""健康检查"""
|
|
return {
|
|
"status": "ok",
|
|
"app": settings.APP_NAME,
|
|
"version": settings.APP_VERSION
|
|
}
|