mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
module price rendering
This commit is contained in:
1 parent
6d2573ee95
commit
f0e0d849d5
12 files changed
+269
-91
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { TankUpgradePricePresetComponent } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_price_preset_component";
|
||||
import type { APIContext, GetStaticPaths } from "astro";
|
||||
import { api } from "../../../../../core/api/dynamic";
|
||||
|
||||
export const getStaticPaths = (async () => {
|
||||
return api.metadata
|
||||
.group("TankUpgradePricePresetEntity")
|
||||
.map(({ name }) => ({ params: { id: name } }));
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
export async function GET({ params }: APIContext<never, { id: string }>) {
|
||||
const preset = await api.tankUpgradePreset(params.id);
|
||||
return new Response(TankUpgradePricePresetComponent.encode(preset).finish());
|
||||
}
|
||||
Reference in new issue
Block a user