initial commit
Some checks failed
Backend CI/CD / test (push) Has been cancelled
Backend CI/CD / deploy (push) Has been cancelled

This commit is contained in:
2026-05-19 20:53:08 +03:30
commit 88b793ed9f
169 changed files with 16763 additions and 0 deletions

1
core/api/__init__.py Normal file
View File

@@ -0,0 +1 @@

13
core/api/schemas.py Normal file
View File

@@ -0,0 +1,13 @@
from typing import Optional
from ninja import Schema
class MessageSchema(Schema):
message: str
class ErrorSchema(Schema):
error: str
details: Optional[str] = None

15
core/api/views.py Normal file
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