X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b8c16b15a9f945b72d2ca4fe0c0172ba422199bc..refs/pull/2283/head:/app/Http/Controllers/BookController.php diff --git a/app/Http/Controllers/BookController.php b/app/Http/Controllers/BookController.php index 1643c62f9..25dc65194 100644 --- a/app/Http/Controllers/BookController.php +++ b/app/Http/Controllers/BookController.php @@ -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');