mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Make Chrly's domain configurable
This commit is contained in:
@@ -10,10 +10,14 @@ use Yii;
|
||||
// TODO: convert to complete Chrly client library
|
||||
class SkinsSystemApi {
|
||||
|
||||
private const BASE_DOMAIN = 'http://skinsystem.ely.by';
|
||||
private string $baseDomain;
|
||||
|
||||
private ?ClientInterface $client = null;
|
||||
|
||||
public function __construct(string $baseDomain) {
|
||||
$this->baseDomain = $baseDomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $username
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
@@ -69,7 +73,7 @@ class SkinsSystemApi {
|
||||
}
|
||||
|
||||
private function buildUrl(string $url): string {
|
||||
return static::BASE_DOMAIN . $url;
|
||||
return $this->baseDomain . $url;
|
||||
}
|
||||
|
||||
private function getClient(): ClientInterface {
|
||||
|
Reference in New Issue
Block a user