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