Function to synchronize user

This commit is contained in:
Gabriel Rosa
2022-09-23 09:25:41 -03:00
parent c29cf5aee1
commit 7245942707
7 changed files with 37 additions and 11 deletions
+8
View File
@@ -241,4 +241,12 @@ export class UsersController {
this.userService.setLanguage(language);
return await this.userService.updateUser(body, id, user.customer_id);
}
@Post('synchronize/:id')
@RequireAllPermissions(PERMISSIONS_GROUPS.DADOSFERA.permissions.SYNC_USER)
@ApiOkResponse({ type: UpdateUserRes })
async synchronizeUser(@User() user: RequestUser, @Param('id') id: string) {
this.logger.info('synchronizeUser', { user });
return await this.userService.synchronizeUser(id);
}
}