Always allow specifying a page size with the API; closes #3218

This commit is contained in:
Dane Everitt 2021-03-26 09:03:51 -07:00
parent 9b46d59045
commit 48ad8f538e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 10 additions and 9 deletions

View file

@ -66,7 +66,7 @@ class UserController extends ApplicationApiController
$users = QueryBuilder::for(User::query())
->allowedFilters(['email', 'uuid', 'username', 'external_id'])
->allowedSorts(['id', 'uuid'])
->paginate(100);
->paginate($request->query('per_page') ?? 50);
return $this->fractal->collection($users)
->transformWith($this->getTransformer(UserTransformer::class))