endpointsd refactore
This commit is contained in:
parent
dfe534a835
commit
831358128e
@ -119,7 +119,7 @@ public class CommisionController extends TokenBasedController {
|
|||||||
return new ResponseEntity<>(result, HttpStatus.OK);
|
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.")
|
@ApiOperation(value = "Return user current assignemts (from newest commision). STUDENT Token needs to be provided.")
|
||||||
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignments() throws Exception {
|
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignments() throws Exception {
|
||||||
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException("User not found"));
|
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException("User not found"));
|
||||||
@ -153,7 +153,7 @@ public class CommisionController extends TokenBasedController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("hasRole('ROLE_DEANERY')")
|
@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.")
|
@ApiOperation(value = "Return given user current assignemts (from newest commision). DEANERY Token needs to be provided.")
|
||||||
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignmentsDeanery(
|
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignmentsDeanery(
|
||||||
@PathVariable(name = "id") Long userId) throws Exception {
|
@PathVariable(name = "id") Long userId) throws Exception {
|
||||||
|
Loading…
Reference in New Issue
Block a user