summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/fork.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/fork.go')
-rw-r--r--routers/api/v1/repo/fork.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/repo/fork.go b/routers/api/v1/repo/fork.go
index 44b79a6fef..25464dbd78 100644
--- a/routers/api/v1/repo/fork.go
+++ b/routers/api/v1/repo/fork.go
@@ -9,6 +9,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ "code.gitea.io/gitea/routers/api/v1/utils"
)
// ListForks list a repository's forks
@@ -29,7 +30,7 @@ func ListForks(ctx *context.APIContext) {
}
apiForks := make([]*api.Repository, len(forks))
for i, fork := range forks {
- access, err := models.AccessLevel(ctx.User.ID, fork)
+ access, err := models.AccessLevel(utils.UserID(ctx), fork)
if err != nil {
ctx.Error(500, "AccessLevel", err)
return