From eb986b2644db19a081f3b4991e1fe447dd0e62ba Mon Sep 17 00:00:00 2001 From: Tudor Sitaru Date: Tue, 6 Jan 2026 16:34:15 +0000 Subject: [PATCH] fixed issue --- backend/app.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/backend/app.py b/backend/app.py index bc50903..75a5b3d 100644 --- a/backend/app.py +++ b/backend/app.py @@ -298,12 +298,9 @@ async def reload_data(): return {"status": "reloaded"} -# Mount static files after all routes are defined -@app.on_event("startup") -async def mount_static(): - """Mount static file serving.""" - if settings.frontend_dir.exists(): - app.mount("/static", StaticFiles(directory=settings.frontend_dir), name="static") +# Mount static files directly (must be after all routes to avoid catching API calls) +if settings.frontend_dir.exists(): + app.mount("/static", StaticFiles(directory=settings.frontend_dir), name="static") if __name__ == "__main__":