aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/repo.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-03 10:48:26 +0800
committerGitHub <noreply@github.com>2022-12-03 10:48:26 +0800
commit0a7d3ff786508284224ada17956a65bb759d9265 (patch)
tree4860fca95c1432ab59c6723ee2b053b1c7d6779d /routers/api/v1/user/repo.go
parent8698458f48eafeab21014db544aa7160368856e1 (diff)
downloadgitea-0a7d3ff786508284224ada17956a65bb759d9265.tar.gz
gitea-0a7d3ff786508284224ada17956a65bb759d9265.zip
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers/api/v1/user/repo.go')
-rw-r--r--routers/api/v1/user/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index 2af70f9ad3..e79a9d8f8b 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -44,7 +44,7 @@ func listUserRepos(ctx *context.APIContext, u *user_model.User, private bool) {
return
}
if ctx.IsSigned && ctx.Doer.IsAdmin || access >= perm.AccessModeRead {
- apiRepos = append(apiRepos, convert.ToRepo(repos[i], access))
+ apiRepos = append(apiRepos, convert.ToRepo(ctx, repos[i], access))
}
}
@@ -127,7 +127,7 @@ func ListMyRepos(ctx *context.APIContext) {
if err != nil {
ctx.Error(http.StatusInternalServerError, "AccessLevel", err)
}
- results[i] = convert.ToRepo(repo, accessMode)
+ results[i] = convert.ToRepo(ctx, repo, accessMode)
}
ctx.SetLinkHeader(int(count), opts.ListOptions.PageSize)