Skip to content

Commit

Permalink
Upgrade version
Browse files Browse the repository at this point in the history
  • Loading branch information
biuuu committed Jan 3, 2024
1 parent d92efac commit 4a41f1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genshin-wish-export",
"version": "0.10.0",
"version": "0.10.1",
"main": "./dist/electron/main/main.js",
"author": "biuuu <https://github.com/biuuu>",
"homepage": "https://github.com/biuuu/genshin-wish-export",
Expand Down
10 changes: 5 additions & 5 deletions src/main/UIGFJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let itemIdDictMd5 = null
const itemIdDictFileName = 'item-id-dict.json'

// acquire dictionary based on give language
const fetchItemIdDict = async (lang = "all") => {
const fetchItemIdDict = async (lang = 'all') => {
// fetch item id dict from api.uigf.org
const response = await fetch(`https://api.uigf.org/dict/genshin/${lang}.json`)
// update local dict
Expand All @@ -70,7 +70,7 @@ const fetchItemIdDict = async (lang = "all") => {
}

// acquire dictionary based on give language
const fetchItemIdDictMd5 = async (lang = "all") => {
const fetchItemIdDictMd5 = async (lang = 'all') => {
const response = await fetch('https://api.uigf.org/md5/genshin')
const responseJson = await response.json()
return responseJson[lang]
Expand Down Expand Up @@ -103,13 +103,13 @@ const initLookupTable = async () => {

// if the data is null or the md5 does not match
if (!data || data.md5 !== itemIdDictMd5) {
// console.log("md5 check failed! Re-fetching...")
// console.log('md5 check failed! Re-fetching...')
await fetchItemIdDict()
return;
}

// if the data is valid and the md5 matches
// console.log("md5 check success!")
// console.log('md5 check success!')
data.lang.forEach(([lang, table]) => itemIdDict.set(lang, new Map(table)))
}

Expand Down

0 comments on commit 4a41f1e

Please sign in to comment.