feat: remote catalog

This commit is contained in:
TrèsAbhi committed 2025-05-28 18:32:04 -05:00
1 parent e7386ff766
commit 5e9aa99755
17 files changed
+109 -67

No files matched your search

@@ -0,0 +1,18 @@
import type { APIRoute, GetStaticPaths, GetStaticPathsItem } from 'astro';
import { catalog } from 'packages/website-ue/src/core/blitz/catalog';
export const getStaticPaths: GetStaticPaths = () => {
const paths: GetStaticPathsItem[] = [];
for (const item in catalog.items) {
paths.push({ params: { item } });
}
return paths;
};
export const GET: APIRoute<{}, { item: string }> = ({ params }) => {
return new Response(catalog.get(params.item).encode(), {
headers: { 'Content-Type': 'application/octet-stream' },
});
};