Skip to content

Commit 7b0ee35

Browse files
committed
Fix al asignar api_version
1 parent 61445b6 commit 7b0ee35

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/ApiClient.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function __construct(?string $token = null, ?string $url = null)
102102

103103
$this->authorization = 'Token';
104104

105-
$this->api_version = $this->env('APIGATEWAY_API_VERSION') ?? $this->api_version;
105+
$this->api_version = $this->env('APIGATEWAY_API_VERSION') ?: $this->api_version;
106106

107107
if ($this->api_version == 'v1') {
108108
$this->api_url = 'https://legacy.apigateway.cl';
@@ -392,11 +392,12 @@ public function consume(
392392
}
393393
$method = $method ?: ($data ? 'POST' : 'GET');
394394
$client = new \GuzzleHttp\Client();
395-
$this->last_url = $this->api_url .
396-
$this->api_prefix .
397-
'/'.
398-
$this->api_version .
399-
$resource;
395+
$this->last_url = $this->api_url
396+
. $this->api_prefix
397+
. '/'
398+
. $this->api_version
399+
. $resource
400+
;
400401

401402
// preparar cabeceras que se usarán
402403
$options[\GuzzleHttp\RequestOptions::HEADERS] = array_merge([

0 commit comments

Comments
 (0)