mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2025-12-06 14:45:38 +01:00
Fix routers
This commit is contained in:
@@ -4,9 +4,14 @@ from .languages import languages_router
|
|||||||
from .users import users_router
|
from .users import users_router
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
routers = [
|
||||||
"healthcheck_router",
|
donation_notifications_router,
|
||||||
"languages_router",
|
healthcheck_router,
|
||||||
"users_router",
|
languages_router,
|
||||||
"donation_notifications_router",
|
users_router,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"routers",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from fastapi_pagination import add_pagination
|
|||||||
from prometheus_fastapi_instrumentator import Instrumentator
|
from prometheus_fastapi_instrumentator import Instrumentator
|
||||||
from redis import asyncio as aioredis
|
from redis import asyncio as aioredis
|
||||||
|
|
||||||
from app.views import healthcheck_router, languages_router, users_router
|
from app.views import routers
|
||||||
from core.config import env_config
|
from core.config import env_config
|
||||||
from core.db import database
|
from core.db import database
|
||||||
|
|
||||||
@@ -13,9 +13,8 @@ from core.db import database
|
|||||||
def start_app() -> FastAPI:
|
def start_app() -> FastAPI:
|
||||||
app = FastAPI(default_response_class=ORJSONResponse)
|
app = FastAPI(default_response_class=ORJSONResponse)
|
||||||
|
|
||||||
app.include_router(users_router)
|
for router in routers:
|
||||||
app.include_router(languages_router)
|
app.include_router(router)
|
||||||
app.include_router(healthcheck_router)
|
|
||||||
|
|
||||||
app.state.database = database
|
app.state.database = database
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user