We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents db559a8 + bacd494 commit ce38bdbCopy full SHA for ce38bdb
1 file changed
src/api/admin.py
@@ -1102,6 +1102,17 @@ async def logout(token: str = Depends(verify_admin_token)):
1102
return await admin_logout(token)
1103
1104
1105
+@router.get("/health")
1106
+async def health_check():
1107
+ """Public health check endpoint - no auth required"""
1108
+ try:
1109
+ stats = await db.get_dashboard_stats()
1110
+ has_active_tokens = stats.get("active_tokens", 0) > 0
1111
+ except Exception:
1112
+ return {"backend_running": True, "has_active_tokens": False}
1113
+ return {"backend_running": True, "has_active_tokens": has_active_tokens}
1114
+
1115
1116
@router.get("/api/stats")
1117
async def get_stats(token: str = Depends(verify_admin_token)):
1118
"""Get statistics for dashboard"""
0 commit comments