Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

fix: fix API endpoint URL in fetchPost calls (#7918)

Yain52547857d7bb
diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts
index 44fe707284..c1ef3973c9 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 9e42e57552..0e07e36787 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;