X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/418fd9037f445164887626fc20ea0c3b1717006d..refs/pull/2416/head:/app/Http/Controllers/Api/BookshelfApiController.php diff --git a/app/Http/Controllers/Api/BookshelfApiController.php b/app/Http/Controllers/Api/BookshelfApiController.php index 14b5e053b..c4851b003 100644 --- a/app/Http/Controllers/Api/BookshelfApiController.php +++ b/app/Http/Controllers/Api/BookshelfApiController.php @@ -1,8 +1,7 @@ get('books', []); $shelf = $this->bookshelfRepo->create($requestData, $bookIds); - Activity::add($shelf, 'bookshelf_create', $shelf->id); return response()->json($shelf); } @@ -94,19 +91,17 @@ class BookshelfApiController extends ApiController $this->checkOwnablePermission('bookshelf-update', $shelf); $requestData = $this->validate($request, $this->rules['update']); - $bookIds = $request->get('books', null); $shelf = $this->bookshelfRepo->update($shelf, $requestData, $bookIds); - Activity::add($shelf, 'bookshelf_update', $shelf->id); - return response()->json($shelf); } /** - * Delete a single shelf from the system. + * Delete a single shelf. + * This will typically send the shelf to the recycle bin. * @throws Exception */ public function delete(string $id) @@ -115,8 +110,6 @@ class BookshelfApiController extends ApiController $this->checkOwnablePermission('bookshelf-delete', $shelf); $this->bookshelfRepo->destroy($shelf); - Activity::addMessage('bookshelf_delete', $shelf->name); - return response('', 204); } } \ No newline at end of file