mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Remove unnecessary check
This commit is contained in:
@@ -135,7 +135,7 @@ App::get('v1/console/resources/:resourceId')
|
||||
->action(function (string $resourceId, string $type, Response $response, Database $dbForConsole) {
|
||||
$document = Authorization::skip(fn () => $dbForConsole->getDocument('rules', $resourceId));
|
||||
|
||||
if ($document && !$document->isEmpty()) {
|
||||
if (!$document->isEmpty()) {
|
||||
throw new Exception(Exception::RESOURCE_ALREADY_EXISTS, 'Resource ID is already in use.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user