This commit is contained in:
2026-04-30 22:55:12 +02:00
parent 30a2dc2e20
commit 430f0d22e4

View File

@@ -11,18 +11,12 @@ def root():
return {"message": "Pozdrav svijete"}
# 🔥 HEALTH CHECK (BITNO: HTTP STATUS se mijenja)
@app.get("/health")
def health():
if not _healthy:
return JSONResponse(
status_code=500,
content={"status": "unhealthy"}
)
return JSONResponse(status_code=500, content={"status": "unhealthy"})
return {"status": "ok"}
# 🔥 BREAK ENDPOINT (simulira kvar)
@app.post("/break")
def break_health():
global _healthy