Add missing endpoint on api Interface contructor
This commit is contained in:
parent
9292cb029b
commit
af77f52bed
2 changed files with 4 additions and 2 deletions
|
|
@ -22,9 +22,10 @@ class CrmApiV2
|
|||
*/
|
||||
private static $apiInterface;
|
||||
|
||||
public function __construct(string $bearerToken = null, string $bearerPwd = null)
|
||||
public function __construct(string $endpoint = null, string $bearerToken = null, string $bearerPwd = null)
|
||||
{
|
||||
self::$apiInterface = self::$apiInterface ?: new ApiInterface(
|
||||
$endpoint,
|
||||
$bearerToken,
|
||||
$bearerPwd
|
||||
);
|
||||
|
|
|
|||
|
|
@ -58,8 +58,9 @@ class ApiInterface
|
|||
*/
|
||||
protected static $apiToken;
|
||||
|
||||
public function __construct(string $bearerToken = null, string $bearerPwd = null)
|
||||
public function __construct(string $endpoint = null, string $bearerToken = null, string $bearerPwd = null)
|
||||
{
|
||||
static::$endpoint = static::$endpoint ?: $endpoint;
|
||||
static::$bearerToken = static::$bearerToken ?: $bearerToken;
|
||||
static::$bearerPwd = static::$bearerPwd ?: $bearerPwd;
|
||||
static::$bearerToken = static::$bearerToken ?: Utils::getConfig('crm.token');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue