Api operations
This commit is contained in:
@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -47,6 +48,7 @@ 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 {
|
||||
|
||||
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException());
|
||||
@ -63,6 +65,7 @@ public class CommisionController extends TokenBasedController {
|
||||
}
|
||||
|
||||
@GetMapping("/user")
|
||||
@ApiOperation("Return list of user all commisions (history of schedules)")
|
||||
public ResponseEntity<List<CommisionResponse>> getAlCommisions() throws UserNotFoundException {
|
||||
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException());
|
||||
List<CommisionResponse> result = CommisionResponseMappers
|
||||
|
Reference in New Issue
Block a user