Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonPazniak committed Dec 21, 2023
1 parent 6434643 commit 4d6bd35
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ResponseEntity<ParsList> getMovieList(@RequestParam("idMovieList") Long i
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully retrieved movie list"),
})
@GetMapping("/getByTitle")
@GetMapping("/get/title")
public ResponseEntity<?> getMovieListByTitle(@RequestParam("idMovieList") String title) {
return movieListService.getAllByTitle(title);
}
Expand All @@ -99,7 +99,7 @@ public ResponseEntity<?> getMovieListByTitle(@RequestParam("idMovieList") String
@ApiResponse(code = 401, message = "Forbidden - user is not authenticated"),
@ApiResponse(code = 404, message = "Movie list or movie not found")
})
@PostMapping("/setMovie")
@PostMapping("/movie/set")
public ResponseEntity<Void> setOrDelMovieInMovieList(@RequestParam("idList") Long idList, @RequestParam("idMovie") Long idMovie) {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
return movieListService.addOrDelItemLIst(authentication.getName(), idList, idMovie);
Expand Down Expand Up @@ -158,13 +158,8 @@ public ResponseEntity<List<ParsList>> getAllMyLists() {
public ResponseEntity<List<ParsList>> getAllUsername(@RequestParam("username") String username) {
return movieListService.getAllByUsernameList(username);
}
@ApiOperation(value = "Get num of likes by movie list", notes = "Returns list of Integers")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully retrieved num of likes "),
@ApiResponse(code = 404, message = "User not found")
})

@GetMapping("/getAllListsContainingMovie")
@GetMapping("/movie/containing")
public ResponseEntity<List<ParsList>> getAllListsContainingMovie(@RequestParam("idMovie") Long idMovie) {
return movieListService.getAllListsContainingMovie(idMovie);
}
Expand Down

0 comments on commit 4d6bd35

Please sign in to comment.