* @throws ImageUploadException
* @throws Exception
*/
- public function updateCoverImage(Book $book, UploadedFile $coverImage = null, bool $removeImage = false)
+ public function updateCoverImage(Book $book, ?UploadedFile $coverImage, bool $removeImage = false)
{
$this->baseRepo->updateCoverImage($book, $coverImage, $removeImage);
}
/**
* Remove a book from the system.
- * @throws NotifyException
- * @throws BindingResolutionException
+ * @throws Exception
*/
public function destroy(Book $book)
{
$trashCan = new TrashCan();
- $trashCan->destroyBook($book);
+ $trashCan->softDestroyBook($book);
+ $trashCan->autoClearOld();
}
}