Feature: add a new buildin picbed - local pc

This commit is contained in:
萌萌哒赫萝
2023-07-07 01:21:16 -07:00
parent 57bf45fb15
commit 5018ce7ce7
3 changed files with 7 additions and 7 deletions

View File

@@ -7,13 +7,13 @@ export const getLatestVersion = async (): Promise<string> => {
const { data: normalList } = await axios.get(RELEASE_URL)
return normalList[0].name
} catch (err) {
console.log(err)
console.error('Error fetching latest version: ', err)
try {
const { data } = await axios.get(`${RELEASE_URL_BACKUP}/latest.yml`)
const r = yaml.load(data) as IStringKeyMap
return r.version
} catch (err) {
console.log(err)
console.error('Error fetching backup latest version: ', err)
return ''
}
}