From 58d6e57d39b0085cf1783b0d812e8790fbb79576 Mon Sep 17 00:00:00 2001 From: Janith Rathnayaka Date: Tue, 10 Dec 2024 10:18:10 +0530 Subject: [PATCH] add console for subscriber --- apps/publisher/src/app/app.controller.ts | 18 +++++++++--------- libs/email/src/lib/email.service.ts | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/publisher/src/app/app.controller.ts b/apps/publisher/src/app/app.controller.ts index 986e19ec..a8a11b04 100644 --- a/apps/publisher/src/app/app.controller.ts +++ b/apps/publisher/src/app/app.controller.ts @@ -74,14 +74,14 @@ export class AppController { } // only for test - // @Get('subscribers') - // @ApiTags('subscribers') - // async subscribers(){ - // try{ - // return this.appService.notifySubscribers(); - // }catch(e){ - // return new HttpException(e.message, 500) - // } - // } + @Get('subscribers') + @ApiTags('subscribers') + async subscribers(){ + try{ + return this.appService.notifySubscribers(); + }catch(e){ + return new HttpException(e.message, 500) + } + } } diff --git a/libs/email/src/lib/email.service.ts b/libs/email/src/lib/email.service.ts index d3909581..1026daf3 100644 --- a/libs/email/src/lib/email.service.ts +++ b/libs/email/src/lib/email.service.ts @@ -593,6 +593,7 @@ export class EmailService { } async sendEmailForSubscribers(email: string, lists: any): Promise { + console.log('subscriber list', lists) const t = EmailTranslations[this.lang]; try { let htmlContent = `