X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c157dc3490c39aa236e22714019a649ebeb11f13..refs/pull/2522/head:/app/Http/Controllers/Api/BookApiController.php diff --git a/app/Http/Controllers/Api/BookApiController.php b/app/Http/Controllers/Api/BookApiController.php index 8ec9fdc06..1b9bddbb1 100644 --- a/app/Http/Controllers/Api/BookApiController.php +++ b/app/Http/Controllers/Api/BookApiController.php @@ -1,10 +1,8 @@ bookRepo = $bookRepo; @@ -42,7 +37,7 @@ class BookApiController extends ApiController { $books = Book::visible(); return $this->apiListingResponse($books, [ - 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'image_id', + 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by', 'image_id', ]); } @@ -64,7 +59,7 @@ class BookApiController extends ApiController */ public function read(string $id) { - $book = Book::visible()->with(['tags', 'cover', 'createdBy', 'updatedBy'])->findOrFail($id); + $book = Book::visible()->with(['tags', 'cover', 'createdBy', 'updatedBy', 'ownedBy'])->findOrFail($id); return response()->json($book); } @@ -84,9 +79,9 @@ class BookApiController extends ApiController } /** - * Delete a single book from the system. - * @throws NotifyException - * @throws BindingResolutionException + * Delete a single book. + * This will typically send the book to the recycle bin. + * @throws \Exception */ public function delete(string $id) {