mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: model api
This commit is contained in:
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);
|
||||
};
|
||||
Reference in new issue
Block a user