feat: track more services events

This commit is contained in:
Ahmed Bouhuolia
2024-10-19 23:47:14 +02:00
parent ccbb399685
commit 32ba6f9a6c
9 changed files with 71 additions and 21 deletions

View File

@@ -1,5 +1,4 @@
import { Service, Inject } from 'typedi';
import I18nService from '@/services/I18n/I18nService';
import HasTenancyService from '@/services/Tenancy/TenancyService';
import { AccountTransformer } from './AccountTransform';
import { TransformerInjectable } from '@/lib/Transformer/TransformerInjectable';
@@ -11,9 +10,6 @@ export class GetAccount {
@Inject()
private tenancy: HasTenancyService;
@Inject()
private i18nService: I18nService;
@Inject()
private transformer: TransformerInjectable;
@@ -44,10 +40,8 @@ export class GetAccount {
new AccountTransformer(),
{ accountsGraph }
);
const eventPayload = {
tenantId,
accountId,
};
const eventPayload = { tenantId, accountId };
// Triggers `onAccountViewed` event.
await this.eventPublisher.emitAsync(events.accounts.onViewed, eventPayload);