minor edits

This commit is contained in:
Zakharov_Rostislav 2024-06-09 13:11:16 +04:00
parent a6c50d4fcd
commit 184e2d3540

View File

@ -135,7 +135,7 @@ public class BookService {
}
@Transactional
public BookEntity removeAuthor(long authorId, long bookId) {
public void removeAuthor(long authorId, long bookId) {
final AuthorsBooksEntity authorBookRecord = authorsBooksRepository.findById(
new AuthorsBooksId(authorId, bookId))
.orElseThrow(() -> new IllegalArgumentException("Invalid id")
@ -143,7 +143,6 @@ public class BookService {
final BookEntity book = get(bookId);
authorsBooksRepository.delete(authorBookRecord);
book.removeAuthor(authorBookRecord);
return book;
}
@Transactional