mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-25 07:03:05 +01:00
feat: meta section
This commit is contained in:
1 parent
1d3cb95b89
commit
40a1eb861d
14 files changed
+141
-18
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { TankCatalogComponent } from "@protos/blitz_static_tank_component";
|
||||
import type { APIContext, GetStaticPaths } from "astro";
|
||||
import { api } from "../../../core/api/dynamic";
|
||||
import { Tank } from "../../../protos/tank";
|
||||
|
||||
export const getStaticPaths = (async () => {
|
||||
const { tanks } = await api.tanks();
|
||||
@@ -13,5 +13,5 @@ export const getStaticPaths = (async () => {
|
||||
*/
|
||||
export async function GET({ params }: APIContext<never, { id: string }>) {
|
||||
const tank = await api.tank(params.id);
|
||||
return new Response(TankCatalogComponent.encode(tank).finish());
|
||||
return new Response(Tank.encode(tank).finish());
|
||||
}
|
||||
Reference in new issue
Block a user