Skip to content

Commit 137dd97

Browse files
authored
Fix: Fixed naming of parameter in UpdateTeamRoles (#304)
1 parent 4e47ff2 commit 137dd97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mongodbatlas/teams.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ func (s *TeamsServiceOp) Rename(ctx context.Context, orgID, teamID, teamName str
268268
// UpdateTeamRoles Update the roles of a team in an Atlas project.
269269
//
270270
// See more: https://docs.atlas.mongodb.com/reference/api/teams-update-roles/
271-
func (s *TeamsServiceOp) UpdateTeamRoles(ctx context.Context, orgID, teamID string, updateTeamRolesRequest *TeamUpdateRoles) ([]TeamRoles, *Response, error) {
272-
if orgID == "" {
273-
return nil, nil, NewArgError("orgID", "must be set")
271+
func (s *TeamsServiceOp) UpdateTeamRoles(ctx context.Context, groupID, teamID string, updateTeamRolesRequest *TeamUpdateRoles) ([]TeamRoles, *Response, error) {
272+
if groupID == "" {
273+
return nil, nil, NewArgError("groupID", "must be set")
274274
}
275275
if teamID == "" {
276276
return nil, nil, NewArgError("teamID", "must be set")
@@ -279,7 +279,7 @@ func (s *TeamsServiceOp) UpdateTeamRoles(ctx context.Context, orgID, teamID stri
279279
return nil, nil, NewArgError("updateTeamRolesRequest", "cannot be nil")
280280
}
281281

282-
path := fmt.Sprintf(teamsProjBasePath, orgID, teamID)
282+
path := fmt.Sprintf(teamsProjBasePath, groupID, teamID)
283283

284284
req, err := s.Client.NewRequest(ctx, http.MethodPatch, path, updateTeamRolesRequest)
285285
if err != nil {

0 commit comments

Comments
 (0)