update icons module

This commit is contained in:
2025-12-16 11:16:49 +03:30
parent cfa7f1e3fe
commit eb47fd75ea
2 changed files with 4 additions and 5 deletions
@@ -22,10 +22,9 @@ export class SuperAdminAuthGuard implements CanActivate {
const { username, password } = credentials;
const expectedUsername = this.configService.get<string>('SUPER_ADMIN_USERNAME') ?? 'danak@dsc.com';
const expectedPassword = this.configService.get<string>('SUPER_ADMIN_PASSWORD') ?? 'DsCdAnAk?@#AFG';
const expectedPassword = this.configService.get<string>('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');
}
@@ -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(