Api params
This commit is contained in:
@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -49,7 +50,9 @@ public class CommisionController extends TokenBasedController {
|
||||
|
||||
@PostMapping("/user")
|
||||
@ApiOperation("Create commision with assignents to given groups. If group doesn't exist error will be thrown")
|
||||
public ResponseEntity<String> addCommision(@RequestBody List<Long> groups) throws UserNotFoundException {
|
||||
public ResponseEntity<String> addCommision(
|
||||
@RequestBody @ApiParam(value = "List of groups ids user want to assign to. If group doesnt exisit error will be thrown", example = "[12,7,3]") List<Long> groups)
|
||||
throws UserNotFoundException {
|
||||
|
||||
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException());
|
||||
Commision com = new Commision(user);
|
||||
|
Reference in New Issue
Block a user