@@ -30,7 +30,7 @@ type ProjectsService interface {
3030 Create (context.Context , * Project ) (* Project , * Response , error )
3131 Delete (context.Context , string ) (* Response , error )
3232 GetProjectTeamsAssigned (context.Context , string ) (* TeamsAssigned , * Response , error )
33- AddTeamsToProject (context.Context , string , * ProjectTeam ) (* TeamsAssigned , * Response , error )
33+ AddTeamsToProject (context.Context , string , [] * ProjectTeam ) (* TeamsAssigned , * Response , error )
3434}
3535
3636//ProjectsServiceOp handles communication with the Projects related methos of the
@@ -65,15 +65,10 @@ type Result struct {
6565 TeamID string `json:"teamId"`
6666}
6767
68- // RoleName represents the kind of user role in your project
69- type RoleName struct {
70- RoleName string `json:"rolesNames"`
71- }
72-
7368// ProjectTeam reperesents the kind of role that has the team
7469type ProjectTeam struct {
75- TeamID string `json:"teamId"`
76- Roles [] * RoleName `json:"roles "`
70+ TeamID string `json:"teamId,omitempty "`
71+ RoleNames [] string `json:"roleNames,omitempty "`
7772}
7873
7974// TeamsAssigned represents the one team assigned to the project.
@@ -216,7 +211,7 @@ func (s *ProjectsServiceOp) GetProjectTeamsAssigned(ctx context.Context, project
216211
217212//AddTeamsToProject adds teams to a project
218213//See more: https://docs.atlas.mongodb.com/reference/api/project-add-team/
219- func (s * ProjectsServiceOp ) AddTeamsToProject (ctx context.Context , projectID string , createRequest * ProjectTeam ) (* TeamsAssigned , * Response , error ) {
214+ func (s * ProjectsServiceOp ) AddTeamsToProject (ctx context.Context , projectID string , createRequest [] * ProjectTeam ) (* TeamsAssigned , * Response , error ) {
220215 if createRequest == nil {
221216 return nil , nil , NewArgError ("createRequest" , "cannot be nil" )
222217 }
0 commit comments