0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-12 13:22:55 +02:00

fix repo api url

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-25 21:20:29 -05:00
parent 1347cb9a73
commit 268e8bc565
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -391,7 +391,7 @@ func (repo *Repository) APIURL(ctxOpt ...context.Context) string {
ctx := util.OptionalArg(ctxOpt, context.TODO())
var groupSegment string
if repo.GroupID > 0 {
groupSegment = fmt.Sprintf("group/%d", repo.GroupID)
groupSegment = fmt.Sprintf("group/%d/", repo.GroupID)
}
return httplib.MakeAbsoluteURL(ctx, setting.AppSubURL+"/api/v1/repos/"+url.PathEscape(repo.OwnerName)+"/"+groupSegment+url.PathEscape(repo.Name))
}