Added docs

This commit is contained in:
Filip Izydorczyk 2020-12-18 15:52:05 +01:00
parent 300130af7e
commit ce0d63d7f9

View File

@ -62,8 +62,10 @@ public class GroupController {
@PreAuthorize("hasRole('ROLE_DEANERY')")
@PutMapping("/{id}/capacity")
public ResponseEntity<String> updateCapacity(@PathVariable(name = "id") Long id,
@RequestParam(name = "newcapacity") int newcapacity) {
@ApiOperation(value = "Change capacity of given group. You need to provide DEANERY token to be ale to change capacity")
public ResponseEntity<String> updateCapacity(
@PathVariable(name = "id") @ApiParam(value = "id of group to change capacity") Long id,
@RequestParam(name = "newcapacity") @ApiParam(value = "capacity to be set") int newcapacity) {
final Groups group = this.groupService.getGroupById(id).get();
if (group == null) {
return new ResponseEntity<>("Given group doens't exist", HttpStatus.NOT_FOUND);