From 524597f891214c6ce86d77ae197b28e9f5efd741 Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Mon, 28 Jul 2025 23:19:34 +0800 Subject: [PATCH] fix: dynamically select API path based on gacha type - Modified `getGachaLogs()` to choose API path based on current gacha_type instead of input URL --- src/main/getData.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/getData.js b/src/main/getData.js index c429526..8c49945 100644 --- a/src/main/getData.js +++ b/src/main/getData.js @@ -213,10 +213,7 @@ const getGachaLogs = async ({ name, key }, queryString) => { let region = '' let region_time_zone = '' let endId = '0' - let gachaURLPath = 'getGachaLog' - if (queryString.includes('gacha_type=21') || queryString.includes('gacha_type=22')) { - gachaURLPath = 'getLdGachaLog' - } + let gachaURLPath = ['21', '22'].includes(key) ? 'getLdGachaLog' : 'getGachaLog' const url = `${apiDomain}/common/gacha_record/api/${gachaURLPath}?${queryString}` do { // if (page % 10 === 0) {