X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/f413fc528a8136c2ad8d33a57b3615fa22e55e93..refs/pull/2376/head:/app/Entities/Repos/BookRepo.php diff --git a/app/Entities/Repos/BookRepo.php b/app/Entities/Repos/BookRepo.php index 7fcc80fac..b0ea7cb87 100644 --- a/app/Entities/Repos/BookRepo.php +++ b/app/Entities/Repos/BookRepo.php @@ -108,7 +108,7 @@ class BookRepo * @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); } @@ -123,12 +123,12 @@ class BookRepo /** * 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(); } }