Skip to content

Commit

Permalink
#527 - Ensure offset is respected in JSON:API.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiasco committed Feb 22, 2024
1 parent cce9d4d commit 3632f9f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected function getJsonApiParams(Request $request, ResourceType $resource_typ
$max = $page['limit'];
}

$params[OffsetPage::KEY_NAME] = new OffsetPage(OffsetPage::DEFAULT_OFFSET, $max);
$params[OffsetPage::KEY_NAME] = new OffsetPage($query['offset'] ?? OffsetPage::DEFAULT_OFFSET, $max);

return $params;
}
Expand Down

0 comments on commit 3632f9f

Please sign in to comment.