feat: parrelel api

This commit is contained in:
tresabhi committed 2025-04-19 00:48:29 -05:00
1 parent c5e6f5e2eb
commit b52c107af9
1 file changed
+7 -5
+7 -5
View File
@@ -10,12 +10,13 @@ export async function glossary() {
const avatars: Record<string, { avatar: Avatar; url: string }> = {}; const avatars: Record<string, { avatar: Avatar; url: string }> = {};
for (const supported of locales.supported) { await Promise.all(
console.log(`Fetching glossary for ${supported.locale}`); locales.supported.map(async (supported) => {
const glossary = await fetchGlossary(supported.blitz ?? supported.locale); const glossary = await fetchGlossary(supported.blitz ?? supported.locale);
console.log(`Found ${Object.keys(glossary).length} things`); console.log(
`Found ${Object.keys(glossary).length} things for ${supported.locale}`,
);
for (const key in glossary) { for (const key in glossary) {
const glossaryEntry = glossary[key]; const glossaryEntry = glossary[key];
@@ -41,7 +42,8 @@ export async function glossary() {
}; };
} }
} }
} }),
);
const changes: FileChange[] = []; const changes: FileChange[] = [];
const gallery: Gallery = { avatars: [] }; const gallery: Gallery = { avatars: [] };