mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-22 15:13:59 -06:00
fixup! Add date range filter to list urls endpoint parameters
This commit is contained in:
parent
f17c46bbed
commit
a28e7987e6
@ -59,10 +59,10 @@ class ListShortUrlsAction extends AbstractRestAction
|
||||
private function queryToListParams(array $query): array
|
||||
{
|
||||
$dateRange = null;
|
||||
$dateStart = isset($query['dateStart']) ? Chronos::parse($query['dateStart']) : null;
|
||||
$dateEnd = isset($query['dateEnd']) ? Chronos::parse($query['dateEnd']) : null;
|
||||
if ($dateStart != null || $dateEnd != null) {
|
||||
$dateRange = new DateRange($dateStart, $dateEnd);
|
||||
$startDate = isset($query['startDate']) ? Chronos::parse($query['startDate']) : null;
|
||||
$endDate = isset($query['endDate']) ? Chronos::parse($query['endDate']) : null;
|
||||
if ($startDate != null || $endDate != null) {
|
||||
$dateRange = new DateRange($startDate, $endDate);
|
||||
}
|
||||
|
||||
return [
|
||||
|
Loading…
Reference in New Issue
Block a user