mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-24 07:37:55 +00:00
Remove USER role
This commit is contained in:
@@ -18,7 +18,7 @@ import { UpdateUnitNameDto } from '../dtos/update.unit.dto';
|
||||
import { CheckFloorTypeGuard } from 'src/guards/floor.type.guard';
|
||||
import { CheckUserUnitGuard } from 'src/guards/user.unit.guard';
|
||||
import { AdminRoleGuard } from 'src/guards/admin.role.guard';
|
||||
import { UserRoleGuard } from 'src/guards/user.role.guard';
|
||||
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
||||
|
||||
@ApiTags('Unit Module')
|
||||
@Controller({
|
||||
@@ -44,7 +44,7 @@ export class UnitController {
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(UserRoleGuard)
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get(':unitUuid')
|
||||
async getUnitByUuid(@Param('unitUuid') unitUuid: string) {
|
||||
try {
|
||||
@@ -59,7 +59,7 @@ export class UnitController {
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(UserRoleGuard)
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get('child/:unitUuid')
|
||||
async getUnitChildByUuid(
|
||||
@Param('unitUuid') unitUuid: string,
|
||||
@@ -76,7 +76,7 @@ export class UnitController {
|
||||
}
|
||||
}
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(UserRoleGuard)
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get('parent/:unitUuid')
|
||||
async getUnitParentByUuid(@Param('unitUuid') unitUuid: string) {
|
||||
try {
|
||||
@@ -104,7 +104,7 @@ export class UnitController {
|
||||
}
|
||||
}
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(UserRoleGuard)
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get('user/:userUuid')
|
||||
async getUnitsByUserId(@Param('userUuid') userUuid: string) {
|
||||
try {
|
||||
@@ -118,7 +118,7 @@ export class UnitController {
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(UserRoleGuard)
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Put('rename/:unitUuid')
|
||||
async renameUnitByUuid(
|
||||
@Param('unitUuid') unitUuid: string,
|
||||
|
||||
Reference in New Issue
Block a user