added check to get user token before loading data
This commit is contained in:
@@ -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)."""
|
||||
|
||||
Reference in New Issue
Block a user