mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2024-11-23 05:40:21 +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",
|
"name": "star-rail-warp-export",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"main": "./dist/electron/main/main.js",
|
"main": "./dist/electron/main/main.js",
|
||||||
"author": "biuuu <https://github.com/biuuu>",
|
"author": "biuuu <https://github.com/biuuu>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -163,7 +163,10 @@ const getGachaLog = async ({ key, page, name, retryCount, url, endId }) => {
|
|||||||
const text = i18n.log
|
const text = i18n.log
|
||||||
try {
|
try {
|
||||||
const res = await request(`${url}&gacha_type=${key}&page=${page}&size=${20}${endId ? '&end_id=' + endId : ''}`)
|
const res = await request(`${url}&gacha_type=${key}&page=${page}&size=${20}${endId ? '&end_id=' + endId : ''}`)
|
||||||
|
if (res?.data?.list) {
|
||||||
return res?.data
|
return res?.data
|
||||||
|
}
|
||||||
|
throw new Error(res?.message || res)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (retryCount) {
|
if (retryCount) {
|
||||||
sendMsg(i18n.parse(text.fetch.retry, { name, page, count: 6 - retryCount }))
|
sendMsg(i18n.parse(text.fetch.retry, { name, page, count: 6 - retryCount }))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user