mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-09 16:39:09 +00:00
FIX: update user email
This commit is contained in:
@@ -98,6 +98,8 @@ export class UpdateUserReq {
|
||||
@ApiPropertyOptional()
|
||||
name?: string;
|
||||
@ApiPropertyOptional()
|
||||
email?: string;
|
||||
@ApiPropertyOptional()
|
||||
jobTitle?: string;
|
||||
@ApiPropertyOptional()
|
||||
department?: string;
|
||||
|
||||
@@ -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] };
|
||||
|
||||
Reference in New Issue
Block a user