Added docs
This commit is contained in:
parent
300130af7e
commit
ce0d63d7f9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user