mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(core): Rename EventRelay to EventService (no-changelog) (#10110)
This commit is contained in:
@@ -12,7 +12,7 @@ import { InternalHooks } from '@/InternalHooks';
|
||||
import { UrlService } from '@/services/url.service';
|
||||
import type { UserRequest } from '@/requests';
|
||||
import { InternalServerError } from '@/errors/response-errors/internal-server.error';
|
||||
import { EventRelay } from '@/eventbus/event-relay.service';
|
||||
import { EventService } from '@/eventbus/event.service';
|
||||
|
||||
@Service()
|
||||
export class UserService {
|
||||
@@ -21,7 +21,7 @@ export class UserService {
|
||||
private readonly userRepository: UserRepository,
|
||||
private readonly mailer: UserManagementMailer,
|
||||
private readonly urlService: UrlService,
|
||||
private readonly eventRelay: EventRelay,
|
||||
private readonly eventService: EventService,
|
||||
) {}
|
||||
|
||||
async update(userId: string, data: Partial<User>) {
|
||||
@@ -158,7 +158,7 @@ export class UserService {
|
||||
email_sent: result.emailSent,
|
||||
invitee_role: role, // same role for all invited users
|
||||
});
|
||||
this.eventRelay.emit('user-invited', {
|
||||
this.eventService.emit('user-invited', {
|
||||
user: owner,
|
||||
targetUserId: Object.values(toInviteUsers),
|
||||
});
|
||||
@@ -169,7 +169,7 @@ export class UserService {
|
||||
message_type: 'New user invite',
|
||||
public_api: false,
|
||||
});
|
||||
this.eventRelay.emit('email-failed', { user: owner, messageType: 'New user invite' });
|
||||
this.eventService.emit('email-failed', { user: owner, messageType: 'New user invite' });
|
||||
this.logger.error('Failed to send email', {
|
||||
userId: owner.id,
|
||||
inviteAcceptUrl,
|
||||
|
||||
Reference in New Issue
Block a user