From eb47fd75ea9ad69d78480ecd355413397d379f84 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Tue, 16 Dec 2025 11:16:49 +0330 Subject: [PATCH] update icons module --- src/modules/auth/guards/superAdminAuth.guard.ts | 5 ++--- src/modules/icons/controllers/icons.controller.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/auth/guards/superAdminAuth.guard.ts b/src/modules/auth/guards/superAdminAuth.guard.ts index feedbba..8fc4ba3 100644 --- a/src/modules/auth/guards/superAdminAuth.guard.ts +++ b/src/modules/auth/guards/superAdminAuth.guard.ts @@ -22,10 +22,9 @@ export class SuperAdminAuthGuard implements CanActivate { const { username, password } = credentials; const expectedUsername = this.configService.get('SUPER_ADMIN_USERNAME') ?? 'danak@dsc.com'; - const expectedPassword = this.configService.get('SUPER_ADMIN_PASSWORD') ?? 'DsCdAnAk?@#AFG'; - + const expectedPassword = this.configService.get('SUPER_ADMIN_PASSWORD') ?? 'DsCdAnAk?@ABC'; if (username !== expectedUsername || password !== expectedPassword) { - this.logger.warn('Invalid super admin credentials attempt', { username }); + this.logger.warn(`Invalid super admin credentials attempt for username: ${username}`); throw new UnauthorizedException('Invalid credentials'); } diff --git a/src/modules/icons/controllers/icons.controller.ts b/src/modules/icons/controllers/icons.controller.ts index 6135bf7..dd85961 100644 --- a/src/modules/icons/controllers/icons.controller.ts +++ b/src/modules/icons/controllers/icons.controller.ts @@ -15,12 +15,12 @@ import { ApiBody, ApiBearerAuth, } from '@nestjs/swagger'; -import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard'; +import { SuperAdminAuthGuard } from 'src/modules/auth/guards/superAdminAuth.guard'; import { UseGuards } from '@nestjs/common'; @ApiTags('icons') @Controller('admin/icons') -@UseGuards(AdminAuthGuard) +@UseGuards(SuperAdminAuthGuard) @ApiBearerAuth() export class IconsController { constructor(