diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-03-14 20:51:46 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-15 08:51:46 +0800 |
commit | ec0ae5d50c59315a3c597b1cf24d4c5508c718e5 (patch) | |
tree | 6f4d6f826dd9866f9b39b66522ec629555700de2 /routers/api/v1/org | |
parent | 7d8f9d1c46e38681f2a4033a7da811ab7562d953 (diff) | |
download | gitea-ec0ae5d50c59315a3c597b1cf24d4c5508c718e5.tar.gz gitea-ec0ae5d50c59315a3c597b1cf24d4c5508c718e5.zip |
Refactor and fix incorrect comment (#1247)
Diffstat (limited to 'routers/api/v1/org')
-rw-r--r-- | routers/api/v1/org/team.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index f9d93399ae..dbd6ccc460 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -131,7 +131,7 @@ func GetTeamRepos(ctx *context.APIContext) { } repos := make([]*api.Repository, len(team.Repos)) for i, repo := range team.Repos { - access, err := models.AccessLevel(ctx.User, repo) + access, err := models.AccessLevel(ctx.User.ID, repo) if err != nil { ctx.Error(500, "GetTeamRepos", err) return @@ -161,7 +161,7 @@ func AddTeamRepository(ctx *context.APIContext) { if ctx.Written() { return } - if access, err := models.AccessLevel(ctx.User, repo); err != nil { + if access, err := models.AccessLevel(ctx.User.ID, repo); err != nil { ctx.Error(500, "AccessLevel", err) return } else if access < models.AccessModeAdmin { @@ -181,7 +181,7 @@ func RemoveTeamRepository(ctx *context.APIContext) { if ctx.Written() { return } - if access, err := models.AccessLevel(ctx.User, repo); err != nil { + if access, err := models.AccessLevel(ctx.User.ID, repo); err != nil { ctx.Error(500, "AccessLevel", err) return } else if access < models.AccessModeAdmin { |