aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs_src/API/v1/repos.md11
-rw-r--r--packages/server/src/routes/api/v1/repo/index.ts2
2 files changed, 7 insertions, 6 deletions
diff --git a/docs_src/API/v1/repos.md b/docs_src/API/v1/repos.md
index e5c24b9..f7bb5ef 100644
--- a/docs_src/API/v1/repos.md
+++ b/docs_src/API/v1/repos.md
@@ -68,11 +68,12 @@ Retrieves a tree entry's commit history.
**Parameters:**<br>
-| Name | Location | Description | Required | Schema |
-|--------|----------|------------------|----------|--------|
-| repo | path | The repository | true | string |
-| path | query | Path in the tree | true | string |
-| branch | query | A branch | false | string |
+| Name | Location | Description | Required | Schema |
+|--------|----------|-------------------|----------|--------|
+| repo | path | The repository | true | string |
+| path | query | Path in the tree | true | string |
+| branch | query | A branch | false | string |
+| count | query | Number of commits | false | number |
**Response:**<br>
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)) });
}