mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 07:07:21 +00:00
Update RoleController to use JwtAuthGuard
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user