Skip to content

Commit

Permalink
refactor: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Dec 23, 2024
1 parent 5a4664b commit 92f3fe8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public boolean deleteMovieById(Long id, String bearerStr) {
}
}
} catch (RuntimeException re) {
LOG.error("Delete movie failed.",re);
LOG.error("Delete movie failed.", re);
result = false;
}
return result;
Expand All @@ -147,7 +147,7 @@ public List<Movie> findMoviesByPage(Integer page, String bearerStr) {
User currentUser = this.userDetailService.getCurrentUser(bearerStr);
List<Movie> result = this.movieRep.findMoviesByPage(currentUser.getId(), PageRequest.of((page - 1), 10));
result = result.stream().flatMap(movie -> Stream.of(this.movieRep.findByIdWithCollections(movie.getId())))
.filter(Optional::isPresent).map(Optional::get).collect(Collectors.toList());
.flatMap(Optional::stream).collect(Collectors.toList());
return result;
}

Expand Down

0 comments on commit 92f3fe8

Please sign in to comment.