partly accepted statistics

This commit is contained in:
Filip Izydorczyk
2021-01-21 16:15:01 +01:00
parent 270e31f120
commit a910709798
3 changed files with 55 additions and 1 deletions

View File

@ -67,7 +67,7 @@ public class StatisticsController {
}
/**
* @return amount of registered to some groups
* @return amount of students that have fully accepted schedules
*/
@PreAuthorize("hasRole('ROLE_DEANERY')")
@GetMapping(path = "/users/accepted")
@ -77,4 +77,15 @@ public class StatisticsController {
return new ResponseEntity<>(response, HttpStatus.OK);
}
/**
* @return amount of students that have purtly accepted schedules
*/
@PreAuthorize("hasRole('ROLE_DEANERY')")
@GetMapping(path = "/users/accepted/partly")
public ResponseEntity<StatisticSimpleNumberResponse> getAcceptedPartlyAmmounts() {
final StatisticSimpleNumberResponse response = new StatisticSimpleNumberResponse(
this.userService.getAmmountOfUsersWithNoAcceptedSchedules());
return new ResponseEntity<>(response, HttpStatus.OK);
}
}