Fix routing

This commit is contained in:
2025-01-11 23:49:30 +01:00
parent c872464d52
commit 159e1ef9c7

View File

@@ -12,6 +12,11 @@ from .views import routes
def get_app() -> FastAPI: def get_app() -> FastAPI:
app = FastAPI() app = FastAPI()
auth.handle_errors(app)
for route in routes:
app.include_router(route)
app.mount( app.mount(
"/", "/",
StaticFiles( StaticFiles(
@@ -21,11 +26,6 @@ def get_app() -> FastAPI:
name="frontend" name="frontend"
) )
auth.handle_errors(app)
for route in routes:
app.include_router(route)
@app.on_event("startup") @app.on_event("startup")
async def startup_event(): async def startup_event():
await mongo_manager.init() await mongo_manager.init()