Files
YG-Rules/app/routes/health.py

20 lines
408 B
Python

"""健康检查接口。"""
from __future__ import annotations
from datetime import datetime
from flask import Blueprint
from app.utils.response import success
health_bp = Blueprint("health", __name__)
@health_bp.get("/api/health")
def health_check():
return success(
{"status": "ok", "service": "YG-Rules", "time": datetime.now().isoformat()},
message="健康检查成功",
)