Skip to content

Commit

Permalink
bug(next): ensure page offset is respected in JSON:API links
Browse files Browse the repository at this point in the history
  • Loading branch information
fiasco authored and marcorcau committed Mar 26, 2024
1 parent 37e3cf4 commit 51b40b6
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 51b40b6

Please sign in to comment.