FIX: update user email

This commit is contained in:
Gabriel Rosa
2022-09-14 10:18:03 -03:00
parent 88c9c36eb0
commit 4cf7c6e17b
5 changed files with 13 additions and 10 deletions
+2
View File
@@ -98,6 +98,8 @@ export class UpdateUserReq {
@ApiPropertyOptional()
name?: string;
@ApiPropertyOptional()
email?: string;
@ApiPropertyOptional()
jobTitle?: string;
@ApiPropertyOptional()
department?: string;
+2 -1
View File
@@ -100,7 +100,7 @@ export class UsersService implements OnModuleInit {
}
async updateUser(req: UpdateUserReq, id: string, customerId: string) {
const { department, hierarchy, jobTitle, name, roleNames } = req;
const { department, hierarchy, jobTitle, name, roleNames, email } = req;
if (roleNames) {
await this.setRoles({ roleNames, userId: id }, customerId);
}
@@ -112,6 +112,7 @@ export class UsersService implements OnModuleInit {
department,
hierarchy,
jobTitle,
email,
}),
);
return { user: this.adjustUsersPayload([user])[0] };