diff --git a/.gitignore b/.gitignore index 6e43c265..8da22b83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /docs/diagrams/.$* /service/coverage/* /service/coverage-ci/* +/node_modules/* *.log .env diff --git a/service/package-lock.json b/service/package-lock.json index 0d9278f8..e7ae61c2 100644 --- a/service/package-lock.json +++ b/service/package-lock.json @@ -1,12 +1,12 @@ { "name": "alkemio-notifications", - "version": "0.6.1", + "version": "0.6.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alkemio-notifications", - "version": "0.6.1", + "version": "0.6.2", "license": "EUPL-1.2", "dependencies": { "@alkemio/client-lib": "^0.17.2", diff --git a/service/package.json b/service/package.json index a9ad5275..afe574dc 100644 --- a/service/package.json +++ b/service/package.json @@ -1,6 +1,6 @@ { "name": "alkemio-notifications", - "version": "0.6.1", + "version": "0.6.2", "description": "Alkemio notifications service", "author": "Alkemio Foundation", "private": false, diff --git a/service/src/services/domain/builders/platform-user-removed/platform.user.removed.notification.builder.ts b/service/src/services/domain/builders/platform-user-removed/platform.user.removed.notification.builder.ts index 966173fd..a06db6ad 100644 --- a/service/src/services/domain/builders/platform-user-removed/platform.user.removed.notification.builder.ts +++ b/service/src/services/domain/builders/platform-user-removed/platform.user.removed.notification.builder.ts @@ -51,15 +51,8 @@ export class PlatformUserRemovedNotificationBuilder private createTemplatePayload( eventPayload: PlatformUserRemovedEventPayload, - recipient: User, - registrant?: User + recipient: User ): PlatformUserRemovedEmailPayload { - if (!registrant) { - throw Error( - `Registrant not provided for '${NotificationEventType.PLATFORM_USER_REMOVED}' event` - ); - } - const notificationPreferenceURL = this.alkemioUrlGenerator.createUserNotificationPreferencesURL( recipient.nameID @@ -68,7 +61,7 @@ export class PlatformUserRemovedNotificationBuilder emailFrom: 'info@alkem.io', registrant: { displayName: eventPayload.user.displayName, - email: registrant.email, + email: eventPayload.user.email, }, recipient: { firstName: recipient.firstName,