Added docs
This commit is contained in:
parent
300130af7e
commit
ce0d63d7f9
@ -62,8 +62,10 @@ public class GroupController {
|
|||||||
|
|
||||||
@PreAuthorize("hasRole('ROLE_DEANERY')")
|
@PreAuthorize("hasRole('ROLE_DEANERY')")
|
||||||
@PutMapping("/{id}/capacity")
|
@PutMapping("/{id}/capacity")
|
||||||
public ResponseEntity<String> updateCapacity(@PathVariable(name = "id") Long id,
|
@ApiOperation(value = "Change capacity of given group. You need to provide DEANERY token to be ale to change capacity")
|
||||||
@RequestParam(name = "newcapacity") int newcapacity) {
|
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();
|
final Groups group = this.groupService.getGroupById(id).get();
|
||||||
if (group == null) {
|
if (group == null) {
|
||||||
return new ResponseEntity<>("Given group doens't exist", HttpStatus.NOT_FOUND);
|
return new ResponseEntity<>("Given group doens't exist", HttpStatus.NOT_FOUND);
|
||||||
|
Loading…
Reference in New Issue
Block a user