mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-25 09:09:48 +00:00
wip
This commit is contained in:
@@ -18,7 +18,7 @@ export class EditUserService {
|
||||
private readonly tenantUserModel: TenantModelProxy<typeof TenantUser>,
|
||||
private readonly eventEmitter: EventEmitter2,
|
||||
private readonly tenancyContext: TenancyContext,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* Creates a new user.
|
||||
@@ -52,7 +52,10 @@ export class EditUserService {
|
||||
const tenantUser = await this.tenantUserModel()
|
||||
.query()
|
||||
.updateAndFetchById(userId, {
|
||||
...editUserDTO,
|
||||
firstName: editUserDTO.firstName,
|
||||
lastName: editUserDTO.lastName,
|
||||
email: editUserDTO.email,
|
||||
roleId: editUserDTO.roleId,
|
||||
});
|
||||
// Triggers `onTenantUserEdited` event.
|
||||
await this.eventEmitter.emitAsync(events.tenantUser.onEdited, {
|
||||
|
||||
Reference in New Issue
Block a user