diff --git a/src/api/schema.ts b/src/api/schema.ts index 4396422..fddb7f4 100644 --- a/src/api/schema.ts +++ b/src/api/schema.ts @@ -61,42 +61,3 @@ export async function fetchSchema(templateId: string): Promise; layer: string }> { - const resp = await http.get>( - `/api/page/schema/${encodeURIComponent(templateId)}`, - { headers: { 'Cache-Control': 'no-cache' } }, - ); - const layer = (resp.headers['x-schema-layer'] ?? 'standard') as string; - return { schema: resp.data, layer }; -} - -/** 保存 overlay(仅管理员) */ -export async function putOverlay( - templateId: string, - schemaJson: string, -): Promise<{ status: number; msg: string }> { - const resp = await http.put( - `/api/page/schema/${encodeURIComponent(templateId)}/overlay`, - schemaJson, - { headers: { 'Content-Type': 'application/json' } }, - ); - return resp.data as { status: number; msg: string }; -} - -/** 还原标准版(删除 overlay,仅管理员) */ -export async function restoreStandard( - templateId: string, -): Promise<{ status: number; msg: string }> { - const resp = await http.delete( - `/api/page/schema/${encodeURIComponent(templateId)}/overlay`, - ); - return resp.data as { status: number; msg: string }; -}