mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add limit param to all endpoints
This commit is contained in:
@@ -43,10 +43,11 @@ class ListRequest extends FormRequest
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function buildParams(): string
|
||||
public function buildParams(int $pageSize): string
|
||||
{
|
||||
$array = [
|
||||
'page' => $this->getPage(),
|
||||
'page' => $this->getPage(),
|
||||
'limit' => $pageSize,
|
||||
];
|
||||
|
||||
$start = $this->getStartDate();
|
||||
@@ -55,9 +56,6 @@ class ListRequest extends FormRequest
|
||||
$array['start'] = $start->format('Y-m-d');
|
||||
$array['end'] = $end->format('Y-m-d');
|
||||
}
|
||||
if (0 !== $this->getLimit()) {
|
||||
$array['limit'] = $this->getLimit();
|
||||
}
|
||||
return http_build_query($array);
|
||||
}
|
||||
|
||||
@@ -86,14 +84,6 @@ class ListRequest extends FormRequest
|
||||
return $this->getCarbonDate('end');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLimit(): int
|
||||
{
|
||||
return $this->convertInteger('limit');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user