fix: clear design cache when activating a design

This commit is contained in:
Jeff Emmett 2026-01-31 13:35:48 +00:00
parent 0724566c05
commit ce77530efc
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ from fastapi import APIRouter, HTTPException
from pydantic import BaseModel
from app.config import get_settings
from app.api.designs import design_service
router = APIRouter()
settings = get_settings()
@ -194,6 +195,9 @@ async def activate_design(slug: str):
content = content.replace("status: draft", "status: active")
metadata_path.write_text(content)
# Clear the design service cache so the new status is picked up
design_service.clear_cache()
return {"status": "activated", "slug": slug}