fix: move taskpool from background to content

This commit is contained in:
Gabe Yuan
2024-04-21 13:16:44 +08:00
parent 74bc58ba91
commit 319aaf8132
8 changed files with 175 additions and 372 deletions

View File

@@ -20,13 +20,14 @@ import {
import { apiSyncData } from "../apis";
import { sha256, removeEndchar } from "./utils";
import { createClient, getPatcher } from "webdav";
import { fetchApi } from "./fetch";
import { fetchPatcher } from "./fetch";
import { kissLog } from "./log";
getPatcher().patch("request", (opts) => {
return fetchApi({
input: opts.url,
init: { method: opts.method, headers: opts.headers, body: opts.data },
return fetchPatcher(opts.url, {
method: opts.method,
headers: opts.headers,
body: opts.data,
});
});