This commit is contained in:
Gabe Yuan
2023-09-08 21:41:32 +08:00
parent 1ff1b21355
commit 441a2ca2da
7 changed files with 158 additions and 36 deletions

View File

@@ -6,7 +6,7 @@ import {
getSubRules,
updateSetting,
} from "./storage";
import { apiFetchRules } from "../apis";
import { apiFetch } from "../apis";
import { checkRules } from "./rules";
import { isAllchar } from "./utils";
@@ -16,7 +16,7 @@ import { isAllchar } from "./utils";
* @returns
*/
export const syncSubRules = async (url, isBg = false) => {
const res = await apiFetchRules(url, isBg);
const res = await apiFetch(url, isBg);
const rules = checkRules(res).filter(
({ pattern }) => !isAllchar(pattern, GLOBAL_KEY)
);