mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-25 07:03:05 +01:00
feat: api renderer
This commit is contained in:
1 parent
428483cf4c
commit
164b7fa454
5 files changed
+79
-13
No files matched your search
@@ -8,6 +8,9 @@ export const getStaticPaths = (async () => {
|
||||
return tanks.map(({ id }) => ({ params: { id } }));
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
/**
|
||||
* Even Noah can't save these animals.
|
||||
*/
|
||||
export async function GET({ params }: APIContext<never, { id: string }>) {
|
||||
const tank = await api.tank(params.id);
|
||||
return new Response(TankCatalogComponent.encode(tank).finish());
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { characteristicsOrder } from "../../../core/tankopedia/characteristicsOrder";
|
||||
|
||||
/**
|
||||
* The naked man fears no pickpocket.
|
||||
*/
|
||||
export function GET() {
|
||||
return Response.json(characteristicsOrder);
|
||||
}
|
||||
Reference in new issue
Block a user