mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix routing
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user