diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2019-07-22 13:32:22 -0400 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-07-22 18:32:22 +0100 |
commit | 26b493bb26ea792d1fdbec93f4088378e70c5871 (patch) | |
tree | 2300f9f8dfc879dd67c6e60da3f809d7ea58c4a6 /routers | |
parent | fe7689a6b28b644ef309350cf01f563201f44d10 (diff) | |
download | gitea-26b493bb26ea792d1fdbec93f4088378e70c5871.tar.gz gitea-26b493bb26ea792d1fdbec93f4088378e70c5871.zip |
Fixes #7564 - Malformed URLs in API git/commits response (#7565)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/commits.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/commits.go b/routers/api/v1/repo/commits.go index 3f3bd13268..795ac1f22f 100644 --- a/routers/api/v1/repo/commits.go +++ b/routers/api/v1/repo/commits.go @@ -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{ @@ -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(), }, }, |