fix: permisson
This commit is contained in:
@@ -119,14 +119,14 @@ export class UsersController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation({ summary: "get all user group ==> admin route" })
|
@ApiOperation({ summary: "get all user group ==> admin route" })
|
||||||
@PermissionsDec(PermissionEnum.ADMINS, PermissionEnum.CUSTOMERS)
|
@PermissionsDec(PermissionEnum.CUSTOMERS)
|
||||||
@Get("user-group")
|
@Get("user-group")
|
||||||
UserGroups() {
|
UserGroups() {
|
||||||
return this.usersService.getUserGroups();
|
return this.usersService.getUserGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation({ summary: "get all users ==> admin route" })
|
@ApiOperation({ summary: "get all users ==> admin route" })
|
||||||
@PermissionsDec(PermissionEnum.ADMINS, PermissionEnum.CUSTOMERS)
|
@PermissionsDec(PermissionEnum.CUSTOMERS)
|
||||||
@Get()
|
@Get()
|
||||||
getUsers() {
|
getUsers() {
|
||||||
return this.usersService.findAllUsers();
|
return this.usersService.findAllUsers();
|
||||||
@@ -147,14 +147,14 @@ export class UsersController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation({ summary: "get customers ==> admin route" })
|
@ApiOperation({ summary: "get customers ==> admin route" })
|
||||||
@PermissionsDec(PermissionEnum.ADMINS, PermissionEnum.CUSTOMERS)
|
@PermissionsDec(PermissionEnum.CUSTOMERS)
|
||||||
@Get("customers")
|
@Get("customers")
|
||||||
getCustomers(@Query() queryDto: SearchCustomersDto) {
|
getCustomers(@Query() queryDto: SearchCustomersDto) {
|
||||||
return this.customersService.getCustomers(queryDto);
|
return this.customersService.getCustomers(queryDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation({ summary: "get customers by id ==> admin route" })
|
@ApiOperation({ summary: "get customers by id ==> admin route" })
|
||||||
@PermissionsDec(PermissionEnum.ADMINS, PermissionEnum.CUSTOMERS)
|
@PermissionsDec(PermissionEnum.CUSTOMERS)
|
||||||
@Get("customers/:id")
|
@Get("customers/:id")
|
||||||
getCustomerById(@Param() paramDto: ParamDto) {
|
getCustomerById(@Param() paramDto: ParamDto) {
|
||||||
return this.customersService.getCustomerById(paramDto.id);
|
return this.customersService.getCustomerById(paramDto.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user