Skip to content

Commit

Permalink
Merge branch 'v0.20.x' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Oct 23, 2023
2 parents dfc72de + cc476dd commit a195d69
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export class RemoveIntegration {

async execute(command: RemoveIntegrationCommand) {
try {
const existingIntegration = await this.integrationRepository.findById(command.integrationId);
const existingIntegration = await this.integrationRepository.findOne({
_id: command.integrationId,
_organizationId: command.organizationId,
});
if (!existingIntegration) {
throw new NotFoundException(`Entity with id ${command.integrationId} not found`);
}
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/src/types/events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface IEmailOptions {
payloadDetails?: any;
notificationDetails?: any;
ipPoolName?: string;
customData?: Record<string, Record<string, unknown>>;
customData?: Record<string, any>;
}

export interface ITriggerPayload {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/lib/events/events.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface IEmailOverrides extends IIntegrationOverride {
cc?: string[];
bcc?: string[];
senderName?: string;
customData?: Record<string, Record<string, unknown>>;
customData?: Record<string, any>;
}

export type ITriggerTenant = string | ITenantDefine;
Expand Down
30 changes: 30 additions & 0 deletions packages/node/src/lib/events/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ describe('test use of novus node package - Events', () => {
test: 'test-data',
},
},
email: {
customData: {
templateId: 'template-id-123',
nestedObject: {
firstChild: {
secondChild: {
name: 'Second Child',
},
},
},
fourthChild: {
name: 'Fourth Child',
},
},
},
},
});

Expand All @@ -85,6 +100,21 @@ describe('test use of novus node package - Events', () => {
test: 'test-data',
},
},
email: {
customData: {
templateId: 'template-id-123',
nestedObject: {
firstChild: {
secondChild: {
name: 'Second Child',
},
},
},
fourthChild: {
name: 'Fourth Child',
},
},
},
},
payload: {
organizationName: 'Company',
Expand Down
2 changes: 1 addition & 1 deletion packages/stateless/src/lib/provider/provider.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface IEmailOptions {
payloadDetails?: any;
notificationDetails?: any;
ipPoolName?: string;
customData?: Record<string, Record<string, unknown>>;
customData?: Record<string, any>;
}

export interface ISmsOptions {
Expand Down

1 comment on commit a195d69

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.