Fix routers

This commit is contained in:
2023-05-24 20:59:00 +02:00
parent 358b5eebb3
commit 0069498708
2 changed files with 13 additions and 9 deletions

View File

@@ -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",
] ]

View File

@@ -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