Skip to content

Commit

Permalink
Fix: Version handling for collection GET (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
silasjoisten authored Oct 14, 2024
1 parent c1a5b87 commit 516c817
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/StoriesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public function all(?StoriesRequest $request = null): StoriesResponse
$request ??= new StoriesRequest();

$response = $this->client->request('GET', self::ENDPOINT, [
'query' => $request->toArray(),
'query' => [
...$request->toArray(),
'version' => null !== $request->version ? $request->version->value : $this->version->value,
],
]);

return new StoriesResponse(
Expand All @@ -66,6 +69,7 @@ public function allByContentType(string $contentType, ?StoriesRequest $request =
'query' => [
...$request->toArray(),
'content_type' => $contentType,
'version' => null !== $request->version ? $request->version->value : $this->version->value,
],
]);

Expand Down

0 comments on commit 516c817

Please sign in to comment.