mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 03:52:36 +02:00
fix repo api url
This commit is contained in:
1 parent
cf7dc29b8f
commit
3c6e457744
1 file changed
+5
-1
+5
-1
@@ -388,7 +388,11 @@ func (repo *Repository) CommitLink(commitID string) (result string) {
|
||||
|
||||
// APIURL returns the repository API URL
|
||||
func (repo *Repository) APIURL() string {
|
||||
return setting.AppURL + "api/v1/repos/" + url.PathEscape(repo.OwnerName) + "/" + url.PathEscape(repo.Name)
|
||||
var groupSegment string
|
||||
if repo.GroupID > 0 {
|
||||
groupSegment = fmt.Sprintf("group/%d", repo.GroupID)
|
||||
}
|
||||
return setting.AppURL + "api/v1/repos/" + url.PathEscape(repo.OwnerName) + "/" + groupSegment + url.PathEscape(repo.Name)
|
||||
}
|
||||
|
||||
// GetCommitsCountCacheKey returns cache key used for commits count caching.
|
||||
|
||||
Reference in new issue
Block a user