Skip to content

Commit

Permalink
feat: allow pageLength to be customised for returnPaginated() api
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Jan 19, 2024
1 parent d7327a2 commit 4ac4481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public function failure(array $context = [])
*
* @return HTTPResponse
*/
public function returnPaginated(SS_List $list, $keyFunc = null, $dataFunc = null)
public function returnPaginated(SS_List $list, $keyFunc = null, $dataFunc = null, $pageLength = 100)
{
list($list, $output) = $this->prepPaginatedOutput($list, $keyFunc, $dataFunc);
list($list, $output) = $this->prepPaginatedOutput($list, $keyFunc, $dataFunc, $pageLength);

return $this->returnArray([
'records' => $output,
Expand Down

0 comments on commit 4ac4481

Please sign in to comment.