fix: map live fetch status failure code
This commit is contained in:
@@ -71,9 +71,9 @@ const getFetchStatusText = (value: unknown) => {
|
||||
const text = normalizeText(value)
|
||||
if (!text) return ''
|
||||
const normalized = text.toLowerCase()
|
||||
if (normalized === 'success' || normalized === '1') return '已抓取'
|
||||
if (normalized === 'pending' || normalized === '0') return '待抓取'
|
||||
if (normalized === 'failed' || normalized === '-1') return '抓取失败'
|
||||
if (normalized === 'success' || normalized === '1') return '已抓取'
|
||||
if (normalized === 'failed' || normalized === 'error' || normalized === '2') return '抓取失败'
|
||||
return text
|
||||
}
|
||||
|
||||
|
||||
@@ -518,9 +518,9 @@ const getLiveFetchStatusText = (value: unknown) => {
|
||||
const text = normalizeLiveText(value)
|
||||
if (!text) return ''
|
||||
const normalized = text.toLowerCase()
|
||||
if (normalized === 'success' || normalized === '1') return '已抓取'
|
||||
if (normalized === 'pending' || normalized === '0') return '待抓取'
|
||||
if (normalized === 'failed' || normalized === '-1') return '抓取失败'
|
||||
if (normalized === 'success' || normalized === '1') return '已抓取'
|
||||
if (normalized === 'failed' || normalized === 'error' || normalized === '2') return '抓取失败'
|
||||
return text
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user