Popravki ce ni config vrednosti

pull/26/head
Jurij Podgoršek 2023-12-16 02:34:11 +01:00
parent 1f58420d8f
commit 475f9b9033
1 changed files with 5 additions and 2 deletions

View File

@ -41,12 +41,15 @@ class Client {
public function __construct(ClientInterface $httpClient, ImmutableConfig $config) {
$this->httpClient = $httpClient;
$this->config = $config;
$this->baseUrl = rtrim($config->get('url'), '/');
$this->baseUrl = $config->get('url') ? rtrim($config->get('url'), '/') : null;
$this->apiKey = $config->get('key');
}
public function checkToken() {
return $this->request('get', 'checkToken');
if ($this->baseUrl) {
return $this->request('checkToken');
}
return false;
}
/**