Annotate return type and use consistent return data

MAILPOET-4300
This commit is contained in:
Oluwaseun Olorunsola
2022-07-12 09:38:47 +01:00
committed by Veljko V
parent d93448c352
commit 5d8b721a52
6 changed files with 17 additions and 16 deletions

View File

@ -219,7 +219,7 @@ class Settings extends APIEndpoint {
$e->getMessage() === AuthorizedEmailsController::AUTHORIZED_EMAIL_ERROR_PENDING_CONFIRMATION
) {
// return true if the email is already authorized or pending confirmation
$response = true;
$response = ['status' => true];
} else {
return $this->badRequest([
APIError::BAD_REQUEST => WPFunctions::get()->__($e->getMessage(), 'mailpoet'),