Updated various classes to take EntityProvider instead of separate entities

This commit is contained in:
Dan Brown
2018-09-25 18:00:40 +01:00
parent 257a5a23ec
commit 495d18814a
9 changed files with 189 additions and 181 deletions

View File

@ -204,7 +204,7 @@ class BookController extends Controller
// Get the books involved in the sort
$bookIdsInvolved = $bookIdsInvolved->unique()->toArray();
$booksInvolved = $this->entityRepo->book->newQuery()->whereIn('id', $bookIdsInvolved)->get();
$booksInvolved = $this->entityRepo->getManyById('book', $bookIdsInvolved, false, true);
// Throw permission error if invalid ids or inaccessible books given.
if (count($bookIdsInvolved) !== count($booksInvolved)) {
$this->showPermissionError();