]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookController.php
Checked over recycle bin parent/child flows
[bookstack] / app / Http / Controllers / BookController.php
index 1643c62f980cd151dabd3fedf0031084bd336c78..25dc651945363e38140609d54772f78957f684c0 100644 (file)
@@ -181,14 +181,13 @@ class BookController extends Controller
     /**
      * Remove the specified book from the system.
      * @throws Throwable
-     * @throws NotifyException
      */
     public function destroy(string $bookSlug)
     {
         $book = $this->bookRepo->getBySlug($bookSlug);
         $this->checkOwnablePermission('book-delete', $book);
 
-        Activity::addMessage('book_delete', $book->name);
+        Activity::add($book, 'book_delete', $book->id);
         $this->bookRepo->destroy($book);
 
         return redirect('/books');