1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Populate URL field of API commits (#3546)

* Populate URL field of API commits

* fix orgmode_test
This commit is contained in:
Ethan Koenig
2018-02-20 04:50:42 -08:00
committed by Bo-Yi Wu
parent 7b297808ce
commit 7b104f0cd0
11 changed files with 126 additions and 98 deletions

View File

@@ -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)