added check to get user token before loading data

This commit is contained in:
Brian Bjarke Jensen
2025-11-13 19:31:36 +01:00
parent 1d641288e5
commit 753339c28a
13 changed files with 112 additions and 100 deletions
+6
View File
@@ -143,6 +143,12 @@ def serve_menu_js() -> FileResponse:
return FileResponse(static_path / "menu.js")
@app.get("/auth-utils.js", include_in_schema=False)
def serve_auth_utils_js() -> FileResponse:
"""Serve the shared auth utilities JavaScript."""
return FileResponse(static_path / "auth-utils.js")
@app.get("/api/")
def read_root(token: Annotated[str, Depends(verify_token)]) -> dict:
"""API root endpoint (requires authentication)."""