Skip to content

Commit

Permalink
Merge pull request #7 from codyworthen/codyworthen/management-client-…
Browse files Browse the repository at this point in the history
…config-fix

codyworthen/management-client-config-fix
  • Loading branch information
RicLeP authored Dec 14, 2024
2 parents cd73f1e + d39f0bf commit d9430f0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public function __construct()
{
parent::__construct();

$this->managementClient = new ManagementClient(config('storyblok.oauth_token'));
$this->managementClient = new ManagementClient(
apiKey: config('storyblok.oauth_token'),
apiEndpoint: config('storyblok.management_api_base_url'),
ssl: config('storyblok.use_ssl')
);
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/Support/ComponentGroupMaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public function __construct(InstallCommand $command)
{
$this->command = $command;

$this->managementClient = new ManagementClient(config('storyblok.oauth_token'));
$this->managementClient = new ManagementClient(
apiKey: config('storyblok.oauth_token'),
apiEndpoint: config('storyblok.management_api_base_url'),
ssl: config('storyblok.use_ssl')
);
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/Support/ComponentMaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public function __construct(InstallCommand $command, $schema)
$this->command = $command;
$this->schema = $schema;

$this->managementClient = new ManagementClient(config('storyblok.oauth_token'));
$this->managementClient = new ManagementClient(
apiKey: config('storyblok.oauth_token'),
apiEndpoint: config('storyblok.management_api_base_url'),
ssl: config('storyblok.use_ssl')
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion stubs/views/blocks/lsf-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>
<span>{{ $block->label }}</span>

<input type="{{ $block->type }}" name="{{ $block->name }}" placeholder="{{ $block->placeholder }}" value="{{ data_get(old(), $block->input_dot_name) }}">
<input type="{{ $block->type }}" name="{{ $block->name }}" placeholder="{{ $block->placeholder }}" value="{{ data_get(old() ? old() : '', $block->input_dot_name) }}">

@error($block->input_dot_name)
<small>{{ $message }}</small>
Expand Down

0 comments on commit d9430f0

Please sign in to comment.