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:
@@ -73,7 +73,6 @@ export const POST: APIRoute = async ({ request }) => {
|
||||
targetPage.sections.push(newSection);
|
||||
|
||||
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, section: newSection }), { status: 201 });
|
||||
|
||||
Reference in New Issue
Block a user