- public function move($bookSlug, $chapterSlug, Request $request) {
- $book = $this->bookRepo->getBySlug($bookSlug);
- $chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
+ /**
+ * Perform the move action for a chapter.
+ * @param Request $request
+ * @param string $bookSlug
+ * @param string $chapterSlug
+ * @return mixed
+ * @throws \BookStack\Exceptions\NotFoundException
+ */
+ public function move(Request $request, string $bookSlug, string $chapterSlug)
+ {
+ $chapter = $this->entityRepo->getEntityBySlug('chapter', $chapterSlug, $bookSlug);