mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Remove per page API limit for self hosters
This commit is contained in:
parent
df286665d8
commit
0b7f3aa92f
@ -155,7 +155,10 @@ class BaseAPIController extends Controller
|
||||
}
|
||||
|
||||
if (is_a($query, "Illuminate\Database\Eloquent\Builder")) {
|
||||
$limit = min(MAX_API_PAGE_SIZE, Input::get('per_page', DEFAULT_API_PAGE_SIZE));
|
||||
$limit = Input::get('per_page', DEFAULT_API_PAGE_SIZE);
|
||||
if (Utils::isNinja()) {
|
||||
$limit = min(MAX_API_PAGE_SIZE, $limit);
|
||||
}
|
||||
$paginator = $query->paginate($limit);
|
||||
$query = $paginator->getCollection();
|
||||
$resource = new Collection($query, $transformer, $entityType);
|
||||
|
Loading…
Reference in New Issue
Block a user