mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: meta section
This commit is contained in:
1 parent
1d3cb95b89
commit
40a1eb861d
14 files changed
+141
-18
No files matched your search
@@ -2,6 +2,7 @@ import type { MetadataAccessor } from "@blitzkit/closed";
|
||||
import { sluggify } from "@blitzkit/core";
|
||||
import type { RemoteStorageComponent } from "@protos/blitz_static_remote_storage_component";
|
||||
import { parse } from "yaml";
|
||||
import type { Tank } from "../../protos/tank";
|
||||
import type { TanksEntry } from "../../protos/tanks";
|
||||
import { AbstractAPI } from "./abstract";
|
||||
|
||||
@@ -115,8 +116,9 @@ export class ServerAPI extends AbstractAPI {
|
||||
|
||||
async tank(id: string) {
|
||||
const item = this.metadata.item(`TankEntity.${id}`);
|
||||
const tankCatalog = item.TankCatalog();
|
||||
const tank = item.TankCatalog();
|
||||
const compensation = item.Compensation();
|
||||
|
||||
return tankCatalog;
|
||||
return { tank, compensation } satisfies Tank;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user