Update RoleController to use JwtAuthGuard

This commit is contained in:
faris Aljohari
2025-01-05 04:17:11 -06:00
parent b287be1338
commit 20356cceda

View File

@ -1,9 +1,9 @@
import { Controller, Get, HttpStatus, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { RoleService } from '../services/role.service';
import { SuperAdminRoleGuard } from 'src/guards/super.admin.role.guard';
import { EnableDisableStatusEnum } from '@app/common/constants/days.enum';
import { ControllerRoute } from '@app/common/constants/controller-route'; // Assuming this is where the routes are defined
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
@ApiTags('Role Module')
@Controller({
@ -14,7 +14,7 @@ export class RoleController {
constructor(private readonly roleService: RoleService) {}
@ApiBearerAuth()
@UseGuards(SuperAdminRoleGuard)
@UseGuards(JwtAuthGuard)
@Get('types')
@ApiOperation({
summary: ControllerRoute.ROLE.ACTIONS.FETCH_ROLE_TYPES_SUMMARY,