Skip to content

Commit

Permalink
fixed base uri in the configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmatwaisi committed May 8, 2022
1 parent 43ad5cc commit ff52495
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Classes/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ class Contact

public function __construct(array $config = [])
{
$this->config = empty($config) ? $this->loadDefaultConfig() : $config;
$configurations = config('activecampaign');

$this->config = empty($configurations) ? $this->loadDefaultConfig() : $configurations;

$this->baseUri = $this->config['api_url'] . '/api/3/';
$this->headers = [
'Api-Token' => $this->config['api_key']
Expand Down
5 changes: 4 additions & 1 deletion src/Classes/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ class CustomField

public function __construct(array $config = [])
{
$this->config = empty($config) ? $this->loadDefaultConfig() : $config;
$configurations = config('activecampaign');

$this->config = empty($configurations) ? $this->loadDefaultConfig() : $configurations;

$this->baseUri = $this->config['api_url'] . '/api/3/';
$this->headers = [
'Api-Token' => $this->config['api_key']
Expand Down
5 changes: 4 additions & 1 deletion src/Classes/Deal.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class Deal

public function __construct(array $config = [])
{
$this->config = empty($config) ? $this->loadDefaultConfig() : $config;
$configurations = config('activecampaign');

$this->config = empty($configurations) ? $this->loadDefaultConfig() : $configurations;

$this->baseUri = $this->config['api_url'] . '/api/3/';
$this->headers = [
'Api-Token' => $this->config['api_key']
Expand Down
5 changes: 4 additions & 1 deletion src/Classes/EventTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class EventTracking

public function __construct(array $config = [])
{
$this->config = empty($config) ? $this->loadDefaultConfig() : $config;
$configurations = config('activecampaign');

$this->config = empty($configurations) ? $this->loadDefaultConfig() : $configurations;

$this->baseUri = 'https://trackcmp.net/';
$this->headers = [
'Api-Token' => $this->config['api_key']
Expand Down

0 comments on commit ff52495

Please sign in to comment.