From 63b9284947f17e27d8c8c7984833d75fae189ae3 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Wed, 25 Nov 2026 11:48:19 -0600 Subject: [PATCH] use common func --- .../[...chunk_api]/icons/currencies/[id].webp.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/website/src/pages/[...chunk_api]/icons/currencies/[id].webp.ts b/packages/website/src/pages/[...chunk_api]/icons/currencies/[id].webp.ts index f6581c798..6602595a4 100644 --- a/packages/website/src/pages/[...chunk_api]/icons/currencies/[id].webp.ts +++ b/packages/website/src/pages/[...chunk_api]/icons/currencies/[id].webp.ts @@ -1,4 +1,5 @@ -import { assertSecret, type BlitzGlossary } from "@blitzkit/core"; +import { fetchGlossary } from "@blitzkit/core"; +import locales from "@blitzkit/i18n/locales.json"; import type { APIContext, GetStaticPathsItem } from "astro"; import sharp from "sharp"; import { mixStaticPaths } from "../../../../core/blitzkit/mixStaticPaths"; @@ -30,13 +31,11 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => { }); } - const glossary = await fetch(assertSecret(import.meta.env.WOTB_GLOSSARY)) - .then((response) => response.json() as Promise) - .then((glossary) => - Object.values(glossary) - .entries() - .filter(([key]) => /^prx_season_\d+$/.test(`${key}`)), - ); + const glossary = await fetchGlossary(locales.default).then((glossary) => + Object.values(glossary) + .entries() + .filter(([key]) => /^prx_season_\d+$/.test(`${key}`)), + ); for (const [id, item] of glossary) { if (!item.image_url) continue;