endpointsd refactore

This commit is contained in:
Filip Izydorczyk 2020-12-10 16:35:23 +01:00
parent dfe534a835
commit 831358128e

View File

@ -119,7 +119,7 @@ public class CommisionController extends TokenBasedController {
return new ResponseEntity<>(result, HttpStatus.OK);
}
@GetMapping("/user/shedule")
@GetMapping("/user/schedule")
@ApiOperation(value = "Return user current assignemts (from newest commision). STUDENT Token needs to be provided.")
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignments() throws Exception {
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException("User not found"));
@ -153,7 +153,7 @@ public class CommisionController extends TokenBasedController {
}
@PreAuthorize("hasRole('ROLE_DEANERY')")
@GetMapping("/user/{id}/shedule")
@GetMapping("/user/{id}/schedule")
@ApiOperation(value = "Return given user current assignemts (from newest commision). DEANERY Token needs to be provided.")
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignmentsDeanery(
@PathVariable(name = "id") Long userId) throws Exception {