2025-09-10 12:15:47 +08:00
|
|
|
from flask_restx import Resource, fields
|
2024-04-08 18:51:46 +08:00
|
|
|
|
2025-09-10 12:15:47 +08:00
|
|
|
from . import api, console_ns
|
2024-04-08 18:51:46 +08:00
|
|
|
|
|
|
|
|
|
2025-09-10 12:15:47 +08:00
|
|
|
@console_ns.route("/ping")
|
2024-04-08 18:51:46 +08:00
|
|
|
class PingApi(Resource):
|
2025-09-10 12:15:47 +08:00
|
|
|
@api.doc("health_check")
|
|
|
|
|
@api.doc(description="Health check endpoint for connection testing")
|
|
|
|
|
@api.response(
|
|
|
|
|
200,
|
|
|
|
|
"Success",
|
|
|
|
|
api.model("PingResponse", {"result": fields.String(description="Health check result", example="pong")}),
|
|
|
|
|
)
|
2024-04-08 18:51:46 +08:00
|
|
|
def get(self):
|
2025-09-10 12:15:47 +08:00
|
|
|
"""Health check endpoint for connection testing"""
|
2024-08-26 15:29:10 +08:00
|
|
|
return {"result": "pong"}
|