minor edits
This commit is contained in:
parent
a6c50d4fcd
commit
184e2d3540
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user