feat(admin) : flag Lunaris catalog updates
CI / Verify (push) Successful in 58s
CI / Build immutable images and deploy (push) Successful in 2m9s

This commit is contained in:
2026-09-03 15:42:31 +07:00 Unverified
parent 5700b55d78
commit 2018005758
3 changed files with 12 additions and 6 deletions
+5 -2
View File
@@ -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`),