fix: enforce strict draft vs publish isolation on all editor API endpoints
All checks were successful
Production Build & Deploy / build-and-deploy (push) Successful in 46s
All checks were successful
Production Build & Deploy / build-and-deploy (push) Successful in 46s
This commit is contained in:
@@ -40,7 +40,6 @@ export const POST: APIRoute = async ({ request }) => {
|
||||
targetSection.settings = { ...targetSection.settings, ...settings };
|
||||
|
||||
await fs.mkdir(DATA_DIR, { recursive: true });
|
||||
await fs.writeFile(livePath, JSON.stringify(config, null, 2), 'utf-8');
|
||||
await fs.writeFile(draftPath, JSON.stringify(config, null, 2), 'utf-8');
|
||||
|
||||
return new Response(JSON.stringify({ success: true, settings: targetSection.settings }), { status: 200 });
|
||||
|
||||
Reference in New Issue
Block a user