1
0
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:
Hillel Coren 2017-12-31 20:57:22 +02:00
parent df286665d8
commit 0b7f3aa92f

View File

@ -155,7 +155,10 @@ class BaseAPIController extends Controller
} }
if (is_a($query, "Illuminate\Database\Eloquent\Builder")) { 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); $paginator = $query->paginate($limit);
$query = $paginator->getCollection(); $query = $paginator->getCollection();
$resource = new Collection($query, $transformer, $entityType); $resource = new Collection($query, $transformer, $entityType);