mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
currency icons
This commit is contained in:
1 parent
f0e0d849d5
commit
d9ce16b41a
6 files changed
+83
-35
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import type { GetStaticPaths } from "astro";
|
||||
import { api } from "../../../core/api/dynamic";
|
||||
import { imageProxy } from "../../../core/api/imageProxy";
|
||||
|
||||
export const getStaticPaths = (async () => {
|
||||
const group = api.metadata.group("CurrencyEntity");
|
||||
return group.map(({ name }) => ({ params: { id: name } }));
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
export async function GET({ params }: { params: { id: string } }) {
|
||||
const icon = await api.currencyIcon(params.id);
|
||||
return await imageProxy(icon);
|
||||
}
|
||||
Reference in new issue
Block a user