Prepare ERP source for Gitea deployment

This commit is contained in:
A R R R Associates
2026-06-20 15:01:44 +05:30
commit 5c75eb6bd9
450 changed files with 67698 additions and 0 deletions
View File
+19
View File
@@ -0,0 +1,19 @@
from fastapi import APIRouter, Request
from app.core.settings import get_settings
router = APIRouter(tags=["system"])
@router.get("/health")
def health(request: Request):
s = get_settings()
return {
"status": "ok",
"app": s.APP_NAME,
"env": s.ENV,
"db_backend": s.DB_BACKEND,
"context": {
"tenant_code": getattr(request.state, "tenant_code", None),
"branch_code": getattr(request.state, "branch_code", None),
"year_code": getattr(request.state, "year_code", None),
},
}