From 059078ea8fe4f3327f7bcae537a7a1b74ea54d8d Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Mon, 6 Oct 2025 17:31:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=BF=BD=E7=95=A5=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E8=AE=BF=E9=97=AE=E4=BB=A4=E7=89=8C=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E7=9A=84=E8=AF=B7=E6=B1=82=20=E6=96=B9=E6=B3=95=E9=87=8D?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 将原有的 CallableMethodBeforeAuth 纳入 --- client/api/Client.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/api/Client.ts b/client/api/Client.ts index e61f1a6..5267555 100644 --- a/client/api/Client.ts +++ b/client/api/Client.ts @@ -56,10 +56,7 @@ class Client { code: -1, msg: err.message.indexOf("timed out") != -1 ? "請求超時" : err.message, }) - if ([ - "User.refreshAccessToken", - "User.auth", - ].indexOf(method) == -1 && res.code == 401) { + if (!["User.refreshAccessToken", ...CallableMethodBeforeAuth].includes(method) && res.code == 401) { const token = await this.refreshAccessToken() if (token) { data.access_token = token