]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/BookApiController.php
Docker: Fix permission with node service by adding node as user
[bookstack] / app / Http / Controllers / Api / BookApiController.php
index b7a5796c6d940f70fc3a329c38b524d0bf9f2bcf..1b9bddbb166321d33c7ae4c65dd931f46141365b 100644 (file)
@@ -37,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',
         ]);
     }
 
@@ -59,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);
     }
 
@@ -79,7 +79,8 @@ class BookApiController extends ApiController
     }
 
     /**
-     * Delete a single book from the system.
+     * Delete a single book.
+     * This will typically send the book to the recycle bin.
      * @throws \Exception
      */
     public function delete(string $id)