aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/api/v1/repo/branches.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src/api/v1/repo/branches.ts')
-rw-r--r--packages/server/src/api/v1/repo/branches.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/api/v1/repo/branches.ts b/packages/server/src/api/v1/repo/branches.ts
index b280a4a..c01e858 100644
--- a/packages/server/src/api/v1/repo/branches.ts
+++ b/packages/server/src/api/v1/repo/branches.ts
@@ -8,7 +8,7 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do
method: "GET",
url: "/branches",
handler: async(req, reply) => {
- const branches = await (await req.repository).branches();
+ const branches = await req.repository.branches();
reply.send({
data: branches.map(branch => {
@@ -25,7 +25,7 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do
method: "GET",
url: "/branches/:branch",
handler: async(req, reply) => {
- const branch = await Branch.lookup(await req.repository, req.params.branch);
+ const branch = await Branch.lookup(req.repository, req.params.branch);
if(!branch) {
reply.code(404).send({ error: "Branch not found!" });