mirror of
https://github.com/vernu/textbee.git
synced 2026-02-20 07:34:00 -05:00
fix(api): fix can-modify-api-key-guard from preventing deletion of revoked apiKeys
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user