currency icons

This commit is contained in:
tresabhi committed 2026-05-15 18:16:06 -05:00
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);
}