fix(server): expose container stats

This commit is contained in:
CyberL1 2025-01-14 15:01:20 -05:00
parent 85a8dc9ccb
commit 63ae224084

View File

@ -0,0 +1,10 @@
import type { Container } from "#src/types/Container.ts";
import { getContainer } from "#src/utils/containers.ts";
import type { FastifyInstance, FastifyRequest } from "fastify";
export default (fastify: FastifyInstance) => {
fastify.get("/", (req: FastifyRequest<{ Params: Container }>) => {
const container = getContainer(req.params.id);
return container.stats();
});
};