mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
ecfeff8539
# Conflicts: # services/backend/api/v1/router.py # services/backend/apps/core/apps.py # services/backend/config/settings.py # tests/README.md
28 lines
516 B
Python
28 lines
516 B
Python
from functools import partial
|
|
|
|
from ninja import NinjaAPI
|
|
|
|
from api.v1 import handlers
|
|
from api.v1.ping.views import router as ping_router
|
|
|
|
router = NinjaAPI(
|
|
title="DataRush API",
|
|
version="1",
|
|
description="API docs for DataRush",
|
|
openapi_url="/docs/openapi.json",
|
|
)
|
|
|
|
|
|
router.add_router(
|
|
"ping",
|
|
ping_router,
|
|
)
|
|
router.add_router(
|
|
"",
|
|
users_router,
|
|
)
|
|
|
|
|
|
for exception, handler in handlers.exception_handlers:
|
|
router.add_exception_handler(exception, partial(handler, router=router))
|