Use better name for the method that updates api keys states
[MAILPOET-5191]
This commit is contained in:
committed by
Veljko V
parent
f4ae6e0f00
commit
edc4ab4f52
@@ -150,7 +150,7 @@ class Settings extends APIEndpoint {
|
||||
|
||||
// when pending approval, leave this to cron / Key Activation tab logic
|
||||
if (!$this->servicesChecker->isMailPoetAPIKeyPendingApproval()) {
|
||||
$this->settingsChangeHandler->updateBridge($settings);
|
||||
$this->settingsChangeHandler->updateApiKeyState($settings);
|
||||
}
|
||||
|
||||
$meta = $this->authorizedEmailsController->onSettingsSave($settings);
|
||||
|
@@ -91,7 +91,7 @@ class SettingsChangeHandler {
|
||||
return $task;
|
||||
}
|
||||
|
||||
public function updateBridge($settings) {
|
||||
public function updateApiKeyState($settings) {
|
||||
$apiKey = $settings[Mailer::MAILER_CONFIG_SETTING_NAME]['mailpoet_api_key'] ?? null;
|
||||
$premiumKey = $settings['premium']['premium_key'] ?? null;
|
||||
if (!empty($apiKey)) {
|
||||
|
@@ -122,7 +122,7 @@ class SettingsChangeHandlerTest extends \MailPoetTest {
|
||||
'subscribersCountReporter' => $countReporterMock,
|
||||
]);
|
||||
|
||||
$changeHandler->updateBridge($settings);
|
||||
$changeHandler->updateApiKeyState($settings);
|
||||
}
|
||||
|
||||
private function getScheduledTaskByType(string $type): ?ScheduledTaskEntity {
|
||||
|
Reference in New Issue
Block a user