1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-19 00:24:31 +00:00

Fixes #7564 - Malformed URLs in API git/commits response (#7565) (#7567)

This commit is contained in:
Richard Mahn 2019-07-22 17:38:38 -04:00 committed by zeripath
parent 426fd2a816
commit 103a66ae83

View File

@ -92,7 +92,7 @@ func GetSingleCommit(ctx *context.APIContext) {
URL: setting.AppURL + ctx.Link[1:], URL: setting.AppURL + ctx.Link[1:],
SHA: commit.ID.String(), 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{ RepoCommit: &api.RepoCommit{
URL: setting.AppURL + ctx.Link[1:], URL: setting.AppURL + ctx.Link[1:],
Author: &api.CommitUser{ Author: &api.CommitUser{
@ -111,7 +111,7 @@ func GetSingleCommit(ctx *context.APIContext) {
}, },
Message: commit.Message(), Message: commit.Message(),
Tree: &api.CommitMeta{ 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(), SHA: commit.ID.String(),
}, },
}, },