From 52547857d7bb6de36898576a2cd034b2988239bc Mon Sep 17 00:00:00 2001 From: Yain <916491013@qq.com> Date: Sun, 9 Apr 2023 09:31:42 +0800 Subject: [PATCH] fix: fix API endpoint URL in fetchPost calls (#7918) --- app/src/block/Panel.ts | 2 +- app/src/window/openNewWindow.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;