mirror of
https://github.com/earthjasonlin/star-rail-warp-export.git
synced 2025-08-02 02:40:18 +08:00
fix: dynamically select API path based on gacha type
- Modified `getGachaLogs()` to choose API path based on current gacha_type instead of input URL
This commit is contained in:
@@ -213,10 +213,7 @@ const getGachaLogs = async ({ name, key }, queryString) => {
|
|||||||
let region = ''
|
let region = ''
|
||||||
let region_time_zone = ''
|
let region_time_zone = ''
|
||||||
let endId = '0'
|
let endId = '0'
|
||||||
let gachaURLPath = 'getGachaLog'
|
let gachaURLPath = ['21', '22'].includes(key) ? 'getLdGachaLog' : 'getGachaLog'
|
||||||
if (queryString.includes('gacha_type=21') || queryString.includes('gacha_type=22')) {
|
|
||||||
gachaURLPath = 'getLdGachaLog'
|
|
||||||
}
|
|
||||||
const url = `${apiDomain}/common/gacha_record/api/${gachaURLPath}?${queryString}`
|
const url = `${apiDomain}/common/gacha_record/api/${gachaURLPath}?${queryString}`
|
||||||
do {
|
do {
|
||||||
// if (page % 10 === 0) {
|
// if (page % 10 === 0) {
|
||||||
|
Reference in New Issue
Block a user