Skip to content

Commit

Permalink
Fixes #7564 - Malformed URLs in API git/commits response (#7565)
Browse files Browse the repository at this point in the history
  • Loading branch information
richmahn authored and zeripath committed Jul 22, 2019
1 parent fe7689a commit 26b493b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/api/v1/repo/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func GetSingleCommit(ctx *context.APIContext) {
URL: setting.AppURL + ctx.Link[1:],
SHA: commit.ID.String(),
},
HTMLURL: ctx.Repo.Repository.HTMLURL() + "/commits/" + commit.ID.String(),
HTMLURL: ctx.Repo.Repository.HTMLURL() + "/commit/" + commit.ID.String(),
RepoCommit: &api.RepoCommit{
URL: setting.AppURL + ctx.Link[1:],
Author: &api.CommitUser{
Expand All @@ -111,7 +111,7 @@ func GetSingleCommit(ctx *context.APIContext) {
},
Message: commit.Message(),
Tree: &api.CommitMeta{
URL: ctx.Repo.Repository.APIURL() + "/trees/" + commit.ID.String(),
URL: ctx.Repo.Repository.APIURL() + "/git/trees/" + commit.ID.String(),
SHA: commit.ID.String(),
},
},
Expand Down

0 comments on commit 26b493b

Please sign in to comment.