mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Started testing work for recycle bin implementation
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user