Skip to content

Commit 103a66a

Browse files
richmahnzeripath
authored andcommitted
Fixes #7564 - Malformed URLs in API git/commits response (#7565) (#7567)
1 parent 426fd2a commit 103a66a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/api/v1/repo/commits.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func GetSingleCommit(ctx *context.APIContext) {
9292
URL: setting.AppURL + ctx.Link[1:],
9393
SHA: commit.ID.String(),
9494
},
95-
HTMLURL: ctx.Repo.Repository.HTMLURL() + "/commits/" + commit.ID.String(),
95+
HTMLURL: ctx.Repo.Repository.HTMLURL() + "/commit/" + commit.ID.String(),
9696
RepoCommit: &api.RepoCommit{
9797
URL: setting.AppURL + ctx.Link[1:],
9898
Author: &api.CommitUser{
@@ -111,7 +111,7 @@ func GetSingleCommit(ctx *context.APIContext) {
111111
},
112112
Message: commit.Message(),
113113
Tree: &api.CommitMeta{
114-
URL: ctx.Repo.Repository.APIURL() + "/trees/" + commit.ID.String(),
114+
URL: ctx.Repo.Repository.APIURL() + "/git/trees/" + commit.ID.String(),
115115
SHA: commit.ID.String(),
116116
},
117117
},

0 commit comments

Comments
 (0)