This commit is contained in:
Maxime Renou 2020-05-11 17:13:58 +02:00
parent 16917638b5
commit 48aa26f177
1 changed files with 7 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class Connect
*/ */
public function request($method, $uri, $data = null, $auth = true): StreamInterface public function request($method, $uri, $data = null, $auth = true): StreamInterface
{ {
$url = config('bconnect.url') ?? 'https://connect.bluesquare.io'; $url = $this->getUrl();
$url = $url . '/' . trim($uri, '/'); $url = $url . '/' . trim($uri, '/');
$client = new Client(); $client = new Client();
@ -102,7 +102,7 @@ class Connect
'state' => $state 'state' => $state
]); ]);
$url = config('bconnect.url') . '/oauth/authorize?' . $query; $url = $this->getUrl() . '/oauth/authorize?' . $query;
return redirect()->to($url); return redirect()->to($url);
} }
@ -261,4 +261,9 @@ class Connect
{ {
return 'onConnectResource' . ucfirst($event); return 'onConnectResource' . ucfirst($event);
} }
protected function getUrl()
{
return config('bconnect.url') ?? 'https://connect.bluesquare.io';
}
} }