]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Controllers/ChapterApiController.php
Comments: Added HTML filter on load, tinymce elem filtering
[bookstack] / app / Entities / Controllers / ChapterApiController.php
index c2132326200c5f186fdcfb82d680103a985ad20f..85c81c2485c92e129c56f2a32ed3f09b5e00e62b 100644 (file)
@@ -134,8 +134,9 @@ class ChapterApiController extends ApiController
         $chapter->unsetRelations()->refresh();
 
         $chapter->load(['tags']);
-        $chapter->makeVisible('description_html')
-            ->setAttribute('description_html', $chapter->descriptionHtml());
+        $chapter->makeVisible('description_html');
+        $chapter->setAttribute('description_html', $chapter->descriptionHtml());
+        $chapter->setAttribute('book_slug', $chapter->book()->first()->slug);
 
         return $chapter;
     }