Added CRUD endpoints for each application.
This commit is contained in:
@@ -2,15 +2,20 @@ from typing import Literal, TypedDict
|
||||
|
||||
from ninja import Router
|
||||
|
||||
router = Router()
|
||||
|
||||
|
||||
class HealthResponse(TypedDict):
|
||||
status: Literal["ok"]
|
||||
|
||||
|
||||
@router.get("/health", response=HealthResponse)
|
||||
def health() -> HealthResponse:
|
||||
return {"status": "ok"}
|
||||
def build_router() -> Router:
|
||||
router = Router()
|
||||
|
||||
@router.get("/health", response=HealthResponse)
|
||||
def health() -> HealthResponse:
|
||||
return {"status": "ok"}
|
||||
|
||||
return router
|
||||
|
||||
|
||||
router = build_router()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user