From 69d8d6d0b98b3f029063dc18968ad2bf82869586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E6=B5=B7?= Date: Sun, 13 Aug 2023 10:11:37 +0800 Subject: [PATCH 1/2] fix!: retry params --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 031f06a..1cc62f0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -316,7 +316,7 @@ export class MediaWikiApi { [data?.errors?.[0].code, data?.error?.code].includes('badtoken') || ['NeedToken', 'WrongToken'].includes(data?.login?.result) ) { - return this.postWithToken(tokenType, data, { + return this.postWithToken(tokenType, ...body, { tokenName, retry: retry - 1, noCache: true, From 32408a177de9d91fd4e14ba7ec2f04567d33ce0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E6=B5=B7?= Date: Sun, 13 Aug 2023 10:19:14 +0800 Subject: [PATCH 2/2] fix!: retry parameter --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 1cc62f0..52c468a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -316,7 +316,7 @@ export class MediaWikiApi { [data?.errors?.[0].code, data?.error?.code].includes('badtoken') || ['NeedToken', 'WrongToken'].includes(data?.login?.result) ) { - return this.postWithToken(tokenType, ...body, { + return this.postWithToken(tokenType, body, { tokenName, retry: retry - 1, noCache: true,