FIX: Update user accepting roleIds

This commit is contained in:
Gabriel Rosa
2022-07-19 10:17:57 -03:00
parent 57f47d3b2e
commit 9cdb0a5d38
5 changed files with 19 additions and 13 deletions
+2 -2
View File
@@ -111,7 +111,7 @@ export class UsersController {
@ApiOkResponse({ type: SetUserRolesRes })
async setUserRoles(@User() user: RequestUser, @Body() body: SetUserRolesReq) {
this.logger.info('createUser', { user });
return await this.userService.setRoles(body);
return await this.userService.setRoles(body, user.customer_id);
}
@Put('role')
@@ -143,6 +143,6 @@ export class UsersController {
@Param('id') id: string,
) {
this.logger.info('updateUser', { user });
return await this.userService.updateUser(body, id);
return await this.userService.updateUser(body, id, user.customer_id);
}
}