0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-11 11:25:38 +00:00

Queries: Update API to align data with previous versions

Ensures fields returned match API docs and previous versions of
BookStack where we were accidentally returning more fields than
expected.
Updates tests to cover many of these.
Also updated clockwork to ignore image requests for less noisy
debugging.
Also updated chapter page query to not be loading all page data, via new
query in PageQueries.
This commit is contained in:
Dan Brown 2024-02-11 15:42:37 +00:00
parent ed9c013f6e
commit 1ea2ac864a
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
11 changed files with 56 additions and 14 deletions
app/Entities/Controllers

View file

@ -26,7 +26,9 @@ class BookApiController extends ApiController
*/
public function list()
{
$books = $this->queries->visibleForList();
$books = $this->queries
->visibleForList()
->addSelect(['created_by', 'updated_by']);
return $this->apiListingResponse($books, [
'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',