mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-12 19:53:12 +02:00
fix repo api url
This commit is contained in:
parent
1347cb9a73
commit
268e8bc565
@ -391,7 +391,7 @@ func (repo *Repository) APIURL(ctxOpt ...context.Context) string {
|
|||||||
ctx := util.OptionalArg(ctxOpt, context.TODO())
|
ctx := util.OptionalArg(ctxOpt, context.TODO())
|
||||||
var groupSegment string
|
var groupSegment string
|
||||||
if repo.GroupID > 0 {
|
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))
|
return httplib.MakeAbsoluteURL(ctx, setting.AppSubURL+"/api/v1/repos/"+url.PathEscape(repo.OwnerName)+"/"+groupSegment+url.PathEscape(repo.Name))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user