public function editAction(Request $request, Lesson $lesson, Chapter $chapter)
    {
        $this->checkPermission('EDIT', $lesson->getResourceNode(), [], true);

        $this->chapterManager->updateChapter($lesson, $chapter, json_decode($request->getContent(), true));

        return new JsonResponse($this->chapterSerializer->serialize($chapter));
    }