fix(api): fix can-modify-api-key-guard from preventing deletion of revoked apiKeys

This commit is contained in:
isra el
2024-11-30 07:01:36 +03:00
parent 9b8fa3ebb0
commit 07321df860

View File

@@ -26,12 +26,6 @@ export class CanModifyApiKey implements CanActivate {
const apiKey = await this.authService.findApiKeyById(apiKeyId)
if (apiKey?.revokedAt) {
throw new HttpException(
{ error: 'Unauthorized' },
HttpStatus.UNAUTHORIZED,
)
}
if (
!!userId &&