Guest User

Untitled

a guest
Jun 6th, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. public Flux<Article> fillAuthor(@NonNull List<Article> articles) {
  2.     return Flux.fromIterable(articles)
  3.             .flatMap(article -> repository.getById(article.author.id)
  4.                     .map(author -> {
  5.                         article.author = author;
  6.                         return article;
  7.                     })
  8.             );
  9. }
Advertisement
Add Comment
Please, Sign In to add comment