mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: parrelel api
This commit is contained in:
1 parent
c5e6f5e2eb
commit
b52c107af9
1 file changed
+7
-5
@@ -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: [] };
|
||||||
|
|||||||
Reference in new issue
Block a user