mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2024-11-22 21:30:22 +08:00
fix: the data saved may be incomplete if the api does not return data (#28)
This commit is contained in:
parent
82f42e56db
commit
298ea3e053
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "star-rail-warp-export",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.18",
|
||||
"main": "./dist/electron/main/main.js",
|
||||
"author": "biuuu <https://github.com/biuuu>",
|
||||
"license": "MIT",
|
||||
|
@ -163,7 +163,10 @@ const getGachaLog = async ({ key, page, name, retryCount, url, endId }) => {
|
||||
const text = i18n.log
|
||||
try {
|
||||
const res = await request(`${url}&gacha_type=${key}&page=${page}&size=${20}${endId ? '&end_id=' + endId : ''}`)
|
||||
if (res?.data?.list) {
|
||||
return res?.data
|
||||
}
|
||||
throw new Error(res?.message || res)
|
||||
} catch (e) {
|
||||
if (retryCount) {
|
||||
sendMsg(i18n.parse(text.fetch.retry, { name, page, count: 6 - retryCount }))
|
||||
|
Loading…
x
Reference in New Issue
Block a user