Skip to content

Commit

Permalink
Set defaults for limit and start
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Jul 8, 2024
1 parent ab686c8 commit ccff10c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/Controller/LogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function logAction(Request $request): Response
$this->handleFilterArray($key, $value);
}

$limit = 30;
$start = 0;

$completeFilter = $this->cacheService->setPagination($limit, $start, $completeFilter);

$order = isset($completeFilter['_order']) === true ? str_replace(['ASC', 'asc', 'DESC', 'desc'], [1, 1, -1, -1], $completeFilter['_order']) : [];
Expand Down

0 comments on commit ccff10c

Please sign in to comment.