Skip to content

Commit 2a071ae

Browse files
authored
Merge pull request #14 from hsynalv/patch-1
getAuthorsByIds method has been implemented
2 parents b97ce8c + 2d62d31 commit 2a071ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

day-08/api/src/main/java/com/bookstore/api/services/AuthorServiceImp.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ public void deleteOneAuthor(int id) {
5757

5858
@Override
5959
public Set<Author> getAuthorsByIds(List<Integer> authorIds) {
60-
61-
return null;
60+
Set<Author> authors = new HashSet<>();
61+
ids.forEach( id -> authors.add(getOneAuthor(id).getData()));
62+
return authors;
6263
}
6364

6465
}

0 commit comments

Comments
 (0)