Remove USER role

This commit is contained in:
faris Aljohari
2024-05-18 23:00:22 +03:00
parent 1bc8fee061
commit 6415d78992
23 changed files with 107 additions and 136 deletions
+7 -7
View File
@@ -16,7 +16,7 @@ import { AddGroupDto } from '../dtos/add.group.dto';
import { ControlGroupDto } from '../dtos/control.group.dto';
import { RenameGroupDto } from '../dtos/rename.group.dto copy';
import { CheckProductUuidForAllDevicesGuard } from 'src/guards/device.product.guard';
import { UserRoleGuard } from 'src/guards/user.role.guard';
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
@ApiTags('Group Module')
@Controller({
@@ -27,7 +27,7 @@ export class GroupController {
constructor(private readonly groupService: GroupService) {}
@ApiBearerAuth()
@UseGuards(UserRoleGuard)
@UseGuards(JwtAuthGuard)
@Get('space/:spaceUuid')
async getGroupsBySpaceUuid(@Param('spaceUuid') spaceUuid: string) {
try {
@@ -40,7 +40,7 @@ export class GroupController {
}
}
@ApiBearerAuth()
@UseGuards(UserRoleGuard)
@UseGuards(JwtAuthGuard)
@Get(':groupUuid')
async getGroupsByGroupId(@Param('groupUuid') groupUuid: string) {
try {
@@ -53,7 +53,7 @@ export class GroupController {
}
}
@ApiBearerAuth()
@UseGuards(UserRoleGuard, CheckProductUuidForAllDevicesGuard)
@UseGuards(JwtAuthGuard, CheckProductUuidForAllDevicesGuard)
@Post()
async addGroup(@Body() addGroupDto: AddGroupDto) {
try {
@@ -67,7 +67,7 @@ export class GroupController {
}
@ApiBearerAuth()
@UseGuards(UserRoleGuard)
@UseGuards(JwtAuthGuard)
@Post('control')
async controlGroup(@Body() controlGroupDto: ControlGroupDto) {
try {
@@ -81,7 +81,7 @@ export class GroupController {
}
@ApiBearerAuth()
@UseGuards(UserRoleGuard)
@UseGuards(JwtAuthGuard)
@Put('rename/:groupUuid')
async renameGroupByUuid(
@Param('groupUuid') groupUuid: string,
@@ -101,7 +101,7 @@ export class GroupController {
}
@ApiBearerAuth()
@UseGuards(UserRoleGuard)
@UseGuards(JwtAuthGuard)
@Delete(':groupUuid')
async deleteGroup(@Param('groupUuid') groupUuid: string) {
try {