diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts index 44fe70728..c1ef3973c 100644 --- a/app/src/block/Panel.ts +++ b/app/src/block/Panel.ts @@ -243,7 +243,7 @@ export class BlockPanel { private initProtyle(editorElement: HTMLElement) { const index = parseInt(editorElement.getAttribute("data-index")); - fetchPost("api/block/getBlockInfo", {id: this.nodeIds[index]}, (response) => { + fetchPost("/api/block/getBlockInfo", {id: this.nodeIds[index]}, (response) => { if (response.code === 3) { showMessage(response.msg); return; diff --git a/app/src/window/openNewWindow.ts b/app/src/window/openNewWindow.ts index 9e42e5755..0e07e3678 100644 --- a/app/src/window/openNewWindow.ts +++ b/app/src/window/openNewWindow.ts @@ -21,7 +21,7 @@ export const openNewWindow = (tab: Tab) => { }; export const openNewWindowById = (id: string) => { - fetchPost("api/block/getBlockInfo", {id}, (response) => { + fetchPost("/api/block/getBlockInfo", {id}, (response) => { if (response.code === 3) { showMessage(response.msg); return;