From 159e1ef9c7307295007bce3a3e1ce4dac9814591 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Sat, 11 Jan 2025 23:49:30 +0100 Subject: [PATCH] Fix routing --- src/modules/web_app/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/web_app/app.py b/src/modules/web_app/app.py index 728d0f3..ba74993 100644 --- a/src/modules/web_app/app.py +++ b/src/modules/web_app/app.py @@ -12,6 +12,11 @@ from .views import routes def get_app() -> FastAPI: app = FastAPI() + auth.handle_errors(app) + + for route in routes: + app.include_router(route) + app.mount( "/", StaticFiles( @@ -21,11 +26,6 @@ def get_app() -> FastAPI: name="frontend" ) - auth.handle_errors(app) - - for route in routes: - app.include_router(route) - @app.on_event("startup") async def startup_event(): await mongo_manager.init()