summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/branch.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2018-02-20 04:50:42 -0800
committerBo-Yi Wu <appleboy.tw@gmail.com>2018-02-20 20:50:42 +0800
commit7b104f0cd03cf3df2b10f6f447857fe389654df1 (patch)
treecb8517fa34a6a7e18bc275f97f6541aa0783ba13 /routers/api/v1/repo/branch.go
parent7b297808cee599f5ff58b9f6afa64d3ee980998e (diff)
downloadgitea-7b104f0cd03cf3df2b10f6f447857fe389654df1.tar.gz
gitea-7b104f0cd03cf3df2b10f6f447857fe389654df1.zip
Populate URL field of API commits (#3546)
* Populate URL field of API commits * fix orgmode_test
Diffstat (limited to 'routers/api/v1/repo/branch.go')
-rw-r--r--routers/api/v1/repo/branch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go
index a82527e6a7..8e44f42368 100644
--- a/routers/api/v1/repo/branch.go
+++ b/routers/api/v1/repo/branch.go
@@ -61,7 +61,7 @@ func GetBranch(ctx *context.APIContext) {
return
}
- ctx.JSON(200, convert.ToBranch(branch, c))
+ ctx.JSON(200, convert.ToBranch(ctx.Repo.Repository, branch, c))
}
// ListBranches list all the branches of a repository
@@ -98,7 +98,7 @@ func ListBranches(ctx *context.APIContext) {
ctx.Error(500, "GetCommit", err)
return
}
- apiBranches[i] = convert.ToBranch(branches[i], c)
+ apiBranches[i] = convert.ToBranch(ctx.Repo.Repository, branches[i], c)
}
ctx.JSON(200, &apiBranches)