mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-18 02:12:30 +08:00
Made fixes/updates during pre-release review
- Fixed page editor default focus not working as expected due to misnamed attribute. - Added owned_by to relevant areas of the API including the docs. - Made book relation on page accessible even if deleted since it could cause an issue on views, such as audit trail, when the relation is accessed when the book is deleted.
This commit is contained in:
@ -43,7 +43,7 @@ class BookshelfApiController extends ApiController
|
||||
{
|
||||
$shelves = Bookshelf::visible();
|
||||
return $this->apiListingResponse($shelves, [
|
||||
'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'image_id',
|
||||
'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by', 'image_id',
|
||||
]);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ class BookshelfApiController extends ApiController
|
||||
public function read(string $id)
|
||||
{
|
||||
$shelf = Bookshelf::visible()->with([
|
||||
'tags', 'cover', 'createdBy', 'updatedBy',
|
||||
'tags', 'cover', 'createdBy', 'updatedBy', 'ownedBy',
|
||||
'books' => function (BelongsToMany $query) {
|
||||
$query->visible()->get(['id', 'name', 'slug']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user