X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c7a2d568bf693add30c8402d68d1f46f09a44c5b..refs/pull/3008/head:/app/Entities/Repos/BookshelfRepo.php diff --git a/app/Entities/Repos/BookshelfRepo.php b/app/Entities/Repos/BookshelfRepo.php index 8f12e9dc0..3990bfbdc 100644 --- a/app/Entities/Repos/BookshelfRepo.php +++ b/app/Entities/Repos/BookshelfRepo.php @@ -1,8 +1,10 @@ -with('visibleBooks') + ->with(['visibleBooks', 'cover']) ->orderBy($sort, $order) ->paginate($count); } @@ -89,6 +91,7 @@ class BookshelfRepo $this->baseRepo->create($shelf, $input); $this->updateBooks($shelf, $bookIds); Activity::addForEntity($shelf, ActivityType::BOOKSHELF_CREATE); + return $shelf; } @@ -104,6 +107,7 @@ class BookshelfRepo } Activity::addForEntity($shelf, ActivityType::BOOKSHELF_UPDATE); + return $shelf; } @@ -129,6 +133,7 @@ class BookshelfRepo /** * Update the given shelf cover image, or clear it. + * * @throws ImageUploadException * @throws Exception */ @@ -137,14 +142,6 @@ class BookshelfRepo $this->baseRepo->updateCoverImage($shelf, $coverImage, $removeImage); } - /** - * Update the permissions of a bookshelf. - */ - public function updatePermissions(Bookshelf $shelf, bool $restricted, Collection $permissions = null) - { - $this->baseRepo->updatePermissions($shelf, $restricted, $permissions); - } - /** * Copy down the permissions of the given shelf to all child books. */ @@ -172,6 +169,7 @@ class BookshelfRepo /** * Remove a bookshelf from the system. + * * @throws Exception */ public function destroy(Bookshelf $shelf)