diff options
Diffstat (limited to 'routers/api/v1/org/org.go')
-rw-r--r-- | routers/api/v1/org/org.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index c5f531923b..2594e4afbb 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -30,12 +30,12 @@ func listUserOrgs(ctx *context.APIContext, u *user_model.User) { UserID: u.ID, IncludePrivate: showPrivate, } - orgs, err := organization.FindOrgs(opts) + orgs, err := organization.FindOrgs(ctx, opts) if err != nil { ctx.Error(http.StatusInternalServerError, "FindOrgs", err) return } - maxResults, err := organization.CountOrgs(opts) + maxResults, err := organization.CountOrgs(ctx, opts) if err != nil { ctx.Error(http.StatusInternalServerError, "CountOrgs", err) return @@ -145,7 +145,7 @@ func GetUserOrgsPermissions(ctx *context.APIContext) { } org := organization.OrgFromUser(o) - authorizeLevel, err := org.GetOrgUserMaxAuthorizeLevel(ctx.ContextUser.ID) + authorizeLevel, err := org.GetOrgUserMaxAuthorizeLevel(ctx, ctx.ContextUser.ID) if err != nil { ctx.Error(http.StatusInternalServerError, "GetOrgUserAuthorizeLevel", err) return @@ -164,7 +164,7 @@ func GetUserOrgsPermissions(ctx *context.APIContext) { op.IsOwner = true } - op.CanCreateRepository, err = org.CanCreateOrgRepo(ctx.ContextUser.ID) + op.CanCreateRepository, err = org.CanCreateOrgRepo(ctx, ctx.ContextUser.ID) if err != nil { ctx.Error(http.StatusInternalServerError, "CanCreateOrgRepo", err) return @@ -268,7 +268,7 @@ func Create(ctx *context.APIContext) { Visibility: visibility, RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess, } - if err := organization.CreateOrganization(org, ctx.Doer); err != nil { + if err := organization.CreateOrganization(ctx, org, ctx.Doer); err != nil { if user_model.IsErrUserAlreadyExist(err) || db.IsErrNameReserved(err) || db.IsErrNameCharsNotAllowed(err) || @@ -429,7 +429,7 @@ func ListOrgActivityFeeds(ctx *context.APIContext) { includePrivate = true } else { org := organization.OrgFromUser(ctx.ContextUser) - isMember, err := org.IsOrgMember(ctx.Doer.ID) + isMember, err := org.IsOrgMember(ctx, ctx.Doer.ID) if err != nil { ctx.Error(http.StatusInternalServerError, "IsOrgMember", err) return |