Refactor part 1

{{url}}/api/v1/courses/getCourses =>  {{url}}/api/v1/courses/all
{{url}}/api/v1/groups/getCourseGroups?id=13 => {{url}}/api/v1/groups/course/13
{{url}}/api/v1/courses/getCoursesWithGroups => {{url}}/api/v1/courses/all?groups=true
{{url}}/api/v1/commisions/add => {{url}}/api/v1/commisions/user
{{url}}/api/v1/commisions/getAllCommisions => {{url}}/api/v1/commisions/user
{{url}}/api/v1/assignments/getCurrentAssignments =>{{url}}/api/v1/assignments/user
{{url}}/api/v1/users/searchForStudents => {{url}}/api/v1/users/search

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2020-10-30 16:42:57 +01:00
parent 4267fadf62
commit 2b59c181e5
6 changed files with 20 additions and 20 deletions

View File

@ -42,7 +42,7 @@ public class CommisionController extends TokenBasedController {
public CommisionController() {
}
@PostMapping("/add")
@PostMapping("/user")
public ResponseEntity<String> addCommision(@RequestBody List<Long> groups) throws UserNotFoundException {
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException());
@ -58,7 +58,7 @@ public class CommisionController extends TokenBasedController {
return new ResponseEntity<>("Succes", HttpStatus.OK);
}
@GetMapping("/getAllCommisions")
@GetMapping("/user")
public ResponseEntity<List<CommisionResponse>> getAlCommisions() throws UserNotFoundException {
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException());
List<CommisionResponse> result = CommisionResponseMappers