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

This commit is contained in:
Yain 2023-04-09 09:31:42 +08:00 committed by GitHub
parent 7b444f65e3
commit 52547857d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;