*/
public function show(string $bookSlug)
{
- $book = $this->queries->findVisibleBySlug($bookSlug);
+ $book = $this->queries->findVisibleBySlugOrFail($bookSlug);
$this->checkOwnablePermission('book-update', $book);
$bookChildren = (new BookContents($book))->getTree(false);
*/
public function showItem(string $bookSlug)
{
- $book = $this->queries->findVisibleBySlug($bookSlug);
+ $book = $this->queries->findVisibleBySlugOrFail($bookSlug);
$bookChildren = (new BookContents($book))->getTree();
return view('books.parts.sort-box', ['book' => $book, 'bookChildren' => $bookChildren]);
*/
public function update(Request $request, string $bookSlug)
{
- $book = $this->queries->findVisibleBySlug($bookSlug);
+ $book = $this->queries->findVisibleBySlugOrFail($bookSlug);
$this->checkOwnablePermission('book-update', $book);
// Return if no map sent