Self-hosted AI workspace.
Python
fix(cookbook): use COOKBOOK_STATE_FILE constant for state path (#3623)
Ashvine4406e11da25
diff --git a/routes/cookbook_routes.py b/routes/cookbook_routes.pyindex 081638cae..4a4764232 100644--- a/routes/cookbook_routes.py+++ b/routes/cookbook_routes.py@@ -15,6 +15,7 @@ from pathlib import Pathfrom fastapi import APIRouter, HTTPException, Request, Dependsfrom src.auth_helpers import require_user+from src.constants import COOKBOOK_STATE_FILEfrom pydantic import BaseModelfrom core.middleware import require_admin@@ -54,7 +55,7 @@ _HF_TOKEN_STATUS_SNIPPET = (def setup_cookbook_routes() -> APIRouter:router = APIRouter(tags=["cookbook"])- _cookbook_state_path = Path(os.environ.get("DATA_DIR", "data")) / "cookbook_state.json"+ _cookbook_state_path = Path(COOKBOOK_STATE_FILE)def _mask_secret(value: str) -> str:if not value: