Always allow specifying a page size with the API; closes #3218
This commit is contained in:
parent
9b46d59045
commit
48ad8f538e
8 changed files with 10 additions and 9 deletions
|
@ -56,7 +56,7 @@ class ServerController extends ApplicationApiController
|
|||
$servers = QueryBuilder::for(Server::query())
|
||||
->allowedFilters(['uuid', 'name', 'image', 'external_id'])
|
||||
->allowedSorts(['id', 'uuid'])
|
||||
->paginate(100);
|
||||
->paginate($request->query('per_page') ?? 50);
|
||||
|
||||
return $this->fractal->collection($servers)
|
||||
->transformWith($this->getTransformer(ServerTransformer::class))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue