1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

API: Added cover to book/shelf list endpoints

Aligns with what we provide in the UI.
Added/updated tests to cover, and updated API examples.

For 5180.
This commit is contained in:
Dan Brown
2024-12-13 14:21:04 +00:00
parent 19ee1c9be7
commit 7e1a8e5ec6
7 changed files with 67 additions and 5 deletions

View File

@ -30,6 +30,7 @@ class BookApiController extends ApiController
{
$books = $this->queries
->visibleForList()
->with(['cover:id,name,url'])
->addSelect(['created_by', 'updated_by']);
return $this->apiListingResponse($books, [