init
Some checks failed
CI/CD / Backend & Frontend Checks (push) Has been cancelled
CI/CD / Deploy to Production (push) Has been cancelled

This commit is contained in:
2026-05-18 11:34:07 +03:30
commit 7a8ddeabed
279 changed files with 37390 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from ninja import Router
from django.db import connection
from django.utils import timezone
health_router = Router()
@health_router.get("/health")
def health(request):
try:
with connection.cursor() as c:
c.execute("SELECT 1;")
return {"status": "ok", "time": timezone.now().isoformat()}
except Exception as e:
return {"status": "error", "error": str(e)}, 500