Remove unnecessary check

This commit is contained in:
Khushboo Verma 2025-01-23 18:47:12 +05:30
parent 76a0167700
commit 246dc07018

View file

@ -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.');
}