health.py 349 B

123456789101112131415
  1. from __future__ import annotations
  2. from quart import Blueprint, jsonify
  3. def create_health_bp() -> Blueprint:
  4. bp = Blueprint("health", __name__)
  5. @bp.route("/health", methods=["GET"])
  6. async def health():
  7. return jsonify(
  8. {"code": 0, "message": "success", "data": {"message": "hello world"}}
  9. )
  10. return bp