fix: health endpoint utilise request.app.version au lieu de version hardcodée
This commit is contained in:
+2
-2
@@ -39,7 +39,7 @@ def _check_rate_limit(request: Request) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
@router.get("/health")
|
@router.get("/health")
|
||||||
async def health():
|
async def health(request: Request):
|
||||||
"""Health check: DB + Gitea connectivity."""
|
"""Health check: DB + Gitea connectivity."""
|
||||||
db_ok = False
|
db_ok = False
|
||||||
gitea_ok = False
|
gitea_ok = False
|
||||||
@@ -57,7 +57,7 @@ async def health():
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"status": "ok" if (db_ok and gitea_ok) else "degraded",
|
"status": "ok" if (db_ok and gitea_ok) else "degraded",
|
||||||
"version": "2.1.0",
|
"version": request.app.version,
|
||||||
"db": db_ok,
|
"db": db_ok,
|
||||||
"gitea": gitea_ok,
|
"gitea": gitea_ok,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user