1
0
Fork 0
mirror of synced 2024-10-02 18:26:49 +13:00
This commit is contained in:
prateek banga 2023-08-17 19:02:07 +05:30
parent 07b7a9db0f
commit c83e4db23d
2 changed files with 4 additions and 3 deletions

View file

@ -392,13 +392,13 @@ App::post('/v1/users/:userId/targets')
$user = $dbForProject->getDocument('users', $userId);
if($user->isEmpty()) {
if ($user->isEmpty()) {
throw new Exception(Exception::USER_NOT_FOUND);
}
$target = $dbForProject->getDocument('targets', $targetId);
if(!$target->isEmpty()) {
if (!$target->isEmpty()) {
throw new Exception(Exception::USER_TARGET_ALREADY_EXISTS);
}

View file

@ -548,8 +548,9 @@ Database::addFilter(
Query::select(['type']),
Query::limit(APP_LIMIT_SUBQUERY),
]));
if($provider)
if ($provider) {
return $provider->getAttribute('type');
}
return null;
}
);