aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org
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/org
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/org')
-rw-r--r--routers/api/v1/org/team.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index f233494fa5..798b792e71 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -546,7 +546,7 @@ func GetTeamRepos(ctx *context.APIContext) {
ctx.Error(http.StatusInternalServerError, "GetTeamRepos", err)
return
}
- repos[i] = convert.ToRepo(repo, access)
+ repos[i] = convert.ToRepo(ctx, repo, access)
}
ctx.SetTotalCountHeader(int64(team.NumRepos))
ctx.JSON(http.StatusOK, repos)
@@ -598,7 +598,7 @@ func GetTeamRepo(ctx *context.APIContext) {
return
}
- ctx.JSON(http.StatusOK, convert.ToRepo(repo, access))
+ ctx.JSON(http.StatusOK, convert.ToRepo(ctx, repo, access))
}
// getRepositoryByParams get repository by a team's organization ID and repo name