Popravki ce ni config vrednosti
parent
1f58420d8f
commit
475f9b9033
|
@ -41,12 +41,15 @@ class Client {
|
||||||
public function __construct(ClientInterface $httpClient, ImmutableConfig $config) {
|
public function __construct(ClientInterface $httpClient, ImmutableConfig $config) {
|
||||||
$this->httpClient = $httpClient;
|
$this->httpClient = $httpClient;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->baseUrl = rtrim($config->get('url'), '/');
|
$this->baseUrl = $config->get('url') ? rtrim($config->get('url'), '/') : null;
|
||||||
$this->apiKey = $config->get('key');
|
$this->apiKey = $config->get('key');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkToken() {
|
public function checkToken() {
|
||||||
return $this->request('get', 'checkToken');
|
if ($this->baseUrl) {
|
||||||
|
return $this->request('checkToken');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue