review fixes
This commit is contained in:
parent
db9a946b0c
commit
2aa8391c5e
|
@ -2063,11 +2063,7 @@ App::patch('/v1/account/email')
|
|||
$oldTarget = $user->find('identifier', $oldEmail, 'targets');
|
||||
|
||||
if ($oldTarget !== false && !$oldTarget->isEmpty()) {
|
||||
try {
|
||||
$dbForProject->updateDocument('targets', $oldTarget->getId(), $oldTarget->setAttribute('identifier', $email));
|
||||
} catch (Duplicate) {
|
||||
throw new Exception(Exception::USER_TARGET_ALREADY_EXISTS);
|
||||
}
|
||||
$dbForProject->updateDocument('targets', $oldTarget->getId(), $oldTarget->setAttribute('identifier', $email));
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -2143,11 +2139,7 @@ App::patch('/v1/account/phone')
|
|||
}
|
||||
|
||||
if ($oldTarget !== false && !$oldTarget->isEmpty()) {
|
||||
try {
|
||||
$dbForProject->updateDocument('targets', $oldTarget->getId(), $oldTarget->setAttribute('identifier', $phone));
|
||||
} catch (Duplicate) {
|
||||
throw new Exception(Exception::USER_TARGET_ALREADY_EXISTS);
|
||||
}
|
||||
$dbForProject->updateDocument('targets', $oldTarget->getId(), $oldTarget->setAttribute('identifier', $phone));
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -814,10 +814,6 @@ App::patch('/v1/messaging/providers/mailgun/:providerId')
|
|||
if ($provider->getAttribute('internal') === true && $enabled === false) {
|
||||
throw new Exception(Exception::PROVIDER_INTERNAL_UPDATE_DISABLED);
|
||||
}
|
||||
if ($provider->getAttribute('internal') === true && $enabled === false) {
|
||||
throw new Exception(Exception::PROVIDER_INTERNAL_UPDATE_DISABLED);
|
||||
}
|
||||
|
||||
$provider->setAttribute('enabled', $enabled);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue