mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-18 10:22:28 +08:00
Chapters API: Added missing book_slug field
Was removed during previous changes, but reflected in response examples. This adds into all standard single chapter responses. For #4765
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user