feat(admin) : flag Lunaris catalog updates
This commit is contained in:
+5
-2
@@ -114,6 +114,10 @@ function rarity(value: string | undefined): number | null {
|
||||
);
|
||||
}
|
||||
|
||||
export async function getLatestLunarisVersion(): Promise<string> {
|
||||
return versionSchema.parse(await getJson(VERSION_URL)).version;
|
||||
}
|
||||
|
||||
async function mapConcurrent<T, R>(
|
||||
items: T[],
|
||||
task: (item: T) => Promise<R>,
|
||||
@@ -176,8 +180,7 @@ async function uploadAssets(
|
||||
}
|
||||
|
||||
export async function processCatalogSync(): Promise<void> {
|
||||
const versionInfo = versionSchema.parse(await getJson(VERSION_URL));
|
||||
const version = versionInfo.version;
|
||||
const version = await getLatestLunarisVersion();
|
||||
const [charactersRaw, weaponsRaw, artifactsRaw] = await Promise.all([
|
||||
getJson(`${API_ROOT}/${version}/charlist.json`),
|
||||
getJson(`${API_ROOT}/${version}/weaponlist.json`),
|
||||
|
||||
Reference in New Issue
Block a user