feat: model api

This commit is contained in:
tresabhi committed 2025-03-29 20:26:32 -05:00
1 parent e6f9b07b20
commit 838ce7f35d
4 files changed
+25 -1

No files matched your search

@@ -0,0 +1,16 @@
import { fetchTankModel } from '@blitzkit/core';
import type { APIRoute } from 'astro';
export { getStaticPaths } from './meta.json';
/**
* Returns information on the 3D model of the tank. i.e. how to assemble and
* position the meshes.
*
* @param id The tank id.
* @returns JSON.
*/
export const GET: APIRoute<{}, { id: string }> = async ({ params }) => {
const tank = await fetchTankModel(params.id);
return Response.json(tank);
};