package io.reflectoring.coderadar.rest.useradministration.teams;

import io.reflectoring.coderadar.rest.AbstractBaseController;
import io.reflectoring.coderadar.useradministration.port.driver.teams.AddUsersToTeamUseCase;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Transactional
public class AddUsersToTeamController implements AbstractBaseController {
    private final AddUsersToTeamUseCase addUsersToTeamUseCase;

    public AddUsersToTeamController(AddUsersToTeamUseCase addUsersToTeamUseCase) {
        this.addUsersToTeamUseCase = addUsersToTeamUseCase;
    }
}

@@ -245,44 +245,360 @@
 ork.
-transaction.annotation.Transactional
+http.HttpStatus;%0Aimport org.springframework.http.MediaType;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.transaction.annotation.Transactional;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.PostMapping;%0Aimport org.springframework.web.bind.annotation.RequestBody
 ;%0Aim
@@ -659,16 +659,40 @@
 oller;%0A%0A
+import java.util.List;%0A%0A
 @RestCon
@@ -935,16 +935,16 @@
 Case) %7B%0A
-
         
@@ -1000,11 +1000,342 @@
 e;%0A    %7D
+%0A%0A    @PostMapping(path = %22/teams/%7BteamId%7D/users%22, consumes = MediaType.APPLICATION_JSON_VALUE)%0A    public ResponseEntity%3CHttpStatus%3E addUsersToTeam(@PathVariable long teamId, @RequestBody List%3CLong%3E userIds) %7B%0A        addUsersToTeamUseCase.addUsersToTeam(teamId, userIds);%0A        return new ResponseEntity%3C%3E(HttpStatus.OK);%0A    %7D
 %0A%7D%0A

implement AddUsersToTeamController