]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/BookRepo.php
LDAP: Added TLS support
[bookstack] / app / Entities / Repos / BookRepo.php
index 7fcc80face7c3833fd87c991402f62fbd37e2926..b0ea7cb87f1bd612c068f591af23ccef8906c793 100644 (file)
@@ -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();
     }
 }