fix: missing tank icon handling

This commit is contained in:
TrèsAbhi committed 2026-04-18 00:30:21 -05:00
1 parent 2504833a29
commit fd6b69edc1
3 files changed
+20 -13

No files matched your search

@@ -7,5 +7,8 @@ export { getStaticPaths } from "./[id].pb";
export async function GET({ params }: APIContext<never, { id: string }>) {
const tank = await api.tank(params.id);
const image = game.tankBigIcon(params.id, tank.tank!.visual_data);
if (image.length === 0) return new Response(null, { status: 404 });
return new Response(new Uint8Array(image));
}