fix main.py

This commit is contained in:
2026-05-01 11:48:04 +02:00
parent 430f0d22e4
commit 0b630929fc

View File

@@ -14,11 +14,11 @@ def root():
@app.get("/health")
def health():
if not _healthy:
return JSONResponse(status_code=500, content={"status": "unhealthy"})
return {"status": "unhealthy"}, 503
return {"status": "ok"}
@app.post("/break")
def break_health():
global _healthy
_healthy = False
return {"message": "Servis je sada nezdrav — ocekuj restart"}
return {"message": "Servis je sada nezdrav"}