From e5f987513a3a19c536acd6b4e80e4c0dbbfd87d6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 8 Aug 2021 22:40:54 +0200 Subject: Added a count query param for the tree history API endpoint --- packages/server/src/routes/api/v1/repo/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/server/src/routes/api/v1/repo/index.ts b/packages/server/src/routes/api/v1/repo/index.ts index 3b115d4..2221171 100644 --- a/packages/server/src/routes/api/v1/repo/index.ts +++ b/packages/server/src/routes/api/v1/repo/index.ts @@ -125,7 +125,7 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do return; } - const history = await tree_entry.history(); + const history = await tree_entry.history(Number(req.query.count)); reply.send({ data: await Promise.all(history.map(commitMap)) }); } -- cgit v1.2.3-18-g5258