]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/BookshelfApiController.php
[Fix] app_footer_links_desc
[bookstack] / app / Http / Controllers / Api / BookshelfApiController.php
index c4851b003f6cc012d12658362e40f3d1608336f4..4ce93defa9e152d7b7837cae05618277fccab0ba 100644 (file)
@@ -43,7 +43,7 @@ class BookshelfApiController extends ApiController
     {
         $shelves = Bookshelf::visible();
         return $this->apiListingResponse($shelves, [
-            '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',
         ]);
     }
 
@@ -70,7 +70,7 @@ class BookshelfApiController extends ApiController
     public function read(string $id)
     {
         $shelf = Bookshelf::visible()->with([
-            'tags', 'cover', 'createdBy', 'updatedBy',
+            'tags', 'cover', 'createdBy', 'updatedBy', 'ownedBy',
             'books' => function (BelongsToMany $query) {
                 $query->visible()->get(['id', 'name', 'slug']);
             }
@@ -112,4 +112,4 @@ class BookshelfApiController extends ApiController
         $this->bookshelfRepo->destroy($shelf);
         return response('', 204);
     }
-}
\ No newline at end of file
+}