diff --git a/src/routes/containers/_id/stats.ts b/src/routes/containers/_id/stats.ts new file mode 100644 index 0000000..d514118 --- /dev/null +++ b/src/routes/containers/_id/stats.ts @@ -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(); + }); +};