mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 18:41:35 +08:00
refactor: remove redundant proxy query paths
This commit is contained in:
@@ -3,6 +3,7 @@ import { failoverApi } from "@/lib/api/failover";
|
||||
import { toast } from "sonner";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { extractErrorMessage } from "@/utils/errorUtils";
|
||||
import { proxyKeys } from "@/lib/query/proxy";
|
||||
|
||||
// ========== 熔断器 Hooks ==========
|
||||
|
||||
@@ -47,7 +48,7 @@ export function useResetCircuitBreaker() {
|
||||
});
|
||||
// 刷新代理状态(更新 active_targets)
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["proxyStatus"],
|
||||
queryKey: proxyKeys.status,
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -283,7 +284,7 @@ export function useSetAutoFailoverEnabled() {
|
||||
queryKey: ["providers", variables.appType],
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["proxyStatus"],
|
||||
queryKey: proxyKeys.status,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user