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()