Remove redundant check

This commit is contained in:
Khushboo Verma 2025-01-14 15:15:18 +05:30
parent aa130075e8
commit 76a0167700

View file

@ -133,10 +133,6 @@ App::get('v1/console/resources/:resourceId')
->inject('response')
->inject('dbForConsole')
->action(function (string $resourceId, string $type, Response $response, Database $dbForConsole) {
if ($type !== 'rules') {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Invalid resource type.');
}
$document = Authorization::skip(fn () => $dbForConsole->getDocument('rules', $resourceId));
if ($document && !$document->isEmpty()) {