feat: start of mechanics

This commit is contained in:
TrèsAbhi committed 2025-12-26 20:07:22 -06:00
1 parent 01409985a2
commit da1af66c77
6 files changed
+37 -21

No files matched your search

@@ -0,0 +1,12 @@
import type { APIContext } from "astro";
import { api } from "../../../core/api/dynamic";
export { getStaticPaths } from "./[id].pb";
/**
* Even Noah can't save these animals.
*/
export async function GET({ params }: APIContext<never, { id: string }>) {
const tank = await api.tank(params.id);
return Response.json(tank);
}
@@ -4,7 +4,6 @@ import { Tank } from "../../../protos/tank";
export const getStaticPaths = (async () => {
const { list } = await api.tankList();
return list.map(({ id }) => ({ params: { id } }));
}) satisfies GetStaticPaths;