mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-25 18:20:24 +08:00
✨ Feature: add a new buildin picbed - local pc
This commit is contained in:
@@ -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 ''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user