Skip to content

Commit 027fca1

Browse files
committed
Init wolt-api-key before request
1 parent 611eb29 commit 027fca1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/WoltClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public static function create(): static
3232
: config('wolt.production_url')
3333
);
3434

35-
$client->addHeader('WOLT-API-KEY', config('wolt.order_api_key'));
36-
3735
return $client;
3836
}
3937

@@ -50,6 +48,7 @@ public function createPendingRequest(): void
5048
public function prepareRequest(): PendingRequest
5149
{
5250
$this->addRouteParameter('baseUrl', $this->baseUrl);
51+
$this->addHeader('WOLT-API-KEY', config('wolt.order_api_key'));
5352

5453
return $this->request
5554
->withUrlParameters($this->routeParameters)

0 commit comments

Comments
 (0)