Skip to content

Commit

Permalink
fixup! added getLoginDetail action to Convertim backend
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik committed Oct 30, 2024
1 parent 66cc6d0 commit 87b037b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Model/Convertim/ConvertimConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ class ConvertimConfig
/**
* @param bool $isEnabled
* @param string $authorizationHeader
* @param string $projectUuid
*/
public function __construct(
public readonly bool $isEnabled,
public readonly string $authorizationHeader,
public readonly string $projectUuid,
) {
}
}
6 changes: 5 additions & 1 deletion src/Model/Convertim/ConvertimConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ConvertimConfigProvider
{
protected const string ENABLED = 'enabled';
protected const string AUTHORIZATION_HEADER = 'authorizationHeader';
protected const string PROJECT_UUID = 'projectUuid';

/**
* @var \Shopsys\ConvertimBundle\Model\Convertim\ConvertimConfig[]
Expand All @@ -37,6 +38,7 @@ public function setConfigs(array $configsByDomainId): void
$this->configsByDomainId[$domainId] = new ConvertimConfig(
$configResolver[static::ENABLED],
$configResolver[static::AUTHORIZATION_HEADER],
$configResolver[static::PROJECT_UUID],
);
}
}
Expand All @@ -50,9 +52,11 @@ protected function createConfigResolver(): OptionsResolver
->setRequired([
static::ENABLED,
static::AUTHORIZATION_HEADER,
static::PROJECT_UUID,
])
->setAllowedTypes(static::ENABLED, ['bool'])
->setAllowedTypes(static::AUTHORIZATION_HEADER, ['string']);
->setAllowedTypes(static::AUTHORIZATION_HEADER, ['string'])
->setAllowedTypes(static::PROJECT_UUID, ['string']);
}

/**
Expand Down

0 comments on commit 87b037b

Please sign in to comment.