1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

review changes

This commit is contained in:
prateek banga 2023-11-29 13:47:44 +05:30
parent ee4c2d0e0d
commit 43b8fc2c31

View file

@ -1161,7 +1161,7 @@ App::patch('/v1/users/:userId/email')
Query::equal('identifier', [$email]),
]);
if ($target && !$target->isEmpty()) {
if ($target instanceof Document && !$target->isEmpty()) {
throw new Exception(Exception::USER_TARGET_ALREADY_EXISTS);
}
@ -1232,7 +1232,7 @@ App::patch('/v1/users/:userId/phone')
Query::equal('identifier', [$number]),
]);
if ($target && !$target->isEmpty()) {
if ($target instanceof Document && !$target->isEmpty()) {
throw new Exception(Exception::USER_TARGET_ALREADY_EXISTS);
}