mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
This commit is contained in:
@@ -11,10 +11,9 @@ export const fetchPost = (
|
||||
cb?: (response: IWebSocketData) => void,
|
||||
headers?: IObject,
|
||||
failCallback?: (response: IWebSocketData) => void,
|
||||
abortSignal?: AbortSignal) => {
|
||||
signal?: AbortSignal) => {
|
||||
const init: RequestInit = {
|
||||
method: "POST",
|
||||
signal: abortSignal,
|
||||
};
|
||||
if (data) {
|
||||
if (["/api/search/searchRefBlock", "/api/graph/getGraph", "/api/graph/getLocalGraph",
|
||||
@@ -39,6 +38,9 @@ export const fetchPost = (
|
||||
if (headers) {
|
||||
init.headers = headers;
|
||||
}
|
||||
if (signal) {
|
||||
init.signal = signal;
|
||||
}
|
||||
let isGetFile202 = false;
|
||||
fetch(url, init).then((response) => {
|
||||
switch (response.status) {
|
||||
|
||||
Reference in New Issue
Block a user