Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio committed Aug 12, 2023
1 parent f75ced5 commit 5c24ab2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Console/InstallPlatformUi.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function handle()
{
$this->resetJSON();

$tenant = $this->askForInput('Do you want to enable multi-tenancy? (yes/no)', 'MULTI_TENANCY_VALUE', 'false', 'tenant');
$tenant = $this->askForInput('Do you want to enable multi-tenancy? (yes/no)', 'MULTI_TENANCY_VALUE', false, 'tenant');

$this->askForInput('Please enter your Enjin Platform URL', 'URL_VALUE', '', 'host');

Expand Down Expand Up @@ -58,7 +58,7 @@ private function askForInput($label, $key, $default = null, $option = null)
{
if (!is_null($optionValue = $this->option($option))) {
if ($option === 'tenant') {
$optionValue = Str::lower($optionValue) === 'yes' ? 'true' : 'false';
$optionValue = Str::lower($optionValue) === 'yes';
}
$this->updateConfig($key, $optionValue);

Expand All @@ -79,7 +79,7 @@ private function askForInput($label, $key, $default = null, $option = null)
}

if ($option === 'tenant') {
$value = Str::lower($value) === 'yes' ? 'true' : 'false';
$value = Str::lower($value) === 'yes';
}

$this->updateConfig($key, $value);
Expand All @@ -95,7 +95,7 @@ private function updateConfig($key, $value)
file_put_contents(
$this->BASE_DIR . 'resources/js/config.json',
str_replace(
$key,
is_bool($value) ? "$key" : $key,
$value,
$appConfig
)
Expand Down

0 comments on commit 5c24ab2

Please sign in to comment.