generated from nathanwoodburn/python-webserver-template
feat: Add status endpoint for health checks
All checks were successful
Build Docker / BuildImage (push) Successful in 46s
All checks were successful
Build Docker / BuildImage (push) Successful in 46s
This commit is contained in:
@@ -253,6 +253,14 @@ def api_schedule():
|
|||||||
return jsonify({"schedule": current_schedule})
|
return jsonify({"schedule": current_schedule})
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/api/v1/status")
|
||||||
|
def api_status():
|
||||||
|
"""
|
||||||
|
API endpoint that returns the status of the server.
|
||||||
|
"""
|
||||||
|
return jsonify({"status": "ok", "timestamp": datetime.now().isoformat()})
|
||||||
|
|
||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user