mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
stuff icon
This commit is contained in:
1 parent
61d6d42742
commit
402d054b30
6 files changed
+59
-11
No files matched your search
@@ -5,7 +5,7 @@ import { getStaticPaths as _getStaticPaths } from "../_index";
|
||||
|
||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const group = api.metadata.group("CurrencyEntity");
|
||||
return group.map(({ name }) => ({ params: { id: name } }));
|
||||
return group.map(({ id }) => ({ params: { id } }));
|
||||
});
|
||||
|
||||
export async function GET({ params }: { params: { id: string } }) {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { api } from "../../../api/dynamic";
|
||||
import { imageProxy } from "../../../api/imageProxy";
|
||||
import { mixStaticPaths } from "../../../astro/mixStaticPaths";
|
||||
import { getStaticPaths as _getStaticPaths } from "../_index";
|
||||
|
||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const group = api.metadata.group("ProxyEntity");
|
||||
return group.map(({ id }) => ({ params: { id } }));
|
||||
});
|
||||
|
||||
export async function GET({ params }: { params: { id: string } }) {
|
||||
const icon = await api.stuffIcon(params.id);
|
||||
return await imageProxy(icon);
|
||||
}
|
||||
Reference in new issue
Block a user