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 { Controller, Get, HttpStatus, UseGuards } from '@nestjs/common';
|
||||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||||
import { RoleService } from '../services/role.service';
|
import { RoleService } from '../services/role.service';
|
||||||
import { SuperAdminRoleGuard } from 'src/guards/super.admin.role.guard';
|
|
||||||
import { EnableDisableStatusEnum } from '@app/common/constants/days.enum';
|
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 { 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')
|
@ApiTags('Role Module')
|
||||||
@Controller({
|
@Controller({
|
||||||
@ -14,7 +14,7 @@ export class RoleController {
|
|||||||
constructor(private readonly roleService: RoleService) {}
|
constructor(private readonly roleService: RoleService) {}
|
||||||
|
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@UseGuards(SuperAdminRoleGuard)
|
@UseGuards(JwtAuthGuard)
|
||||||
@Get('types')
|
@Get('types')
|
||||||
@ApiOperation({
|
@ApiOperation({
|
||||||
summary: ControllerRoute.ROLE.ACTIONS.FETCH_ROLE_TYPES_SUMMARY,
|
summary: ControllerRoute.ROLE.ACTIONS.FETCH_ROLE_TYPES_SUMMARY,
|
||||||
|
Reference in New Issue
Block a user