From 023955ad271825a5f3bb5bfcb4d59491427ee395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yahya=20Mehmet=20Sa=C4=9Fdur?= Date: Wed, 10 Jul 2024 18:26:17 +0300 Subject: [PATCH] feat: Add configuration for email and SMS in notification module --- src/notification.module.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/notification.module.ts b/src/notification.module.ts index 5cfe4fe..f1c387b 100644 --- a/src/notification.module.ts +++ b/src/notification.module.ts @@ -2,9 +2,18 @@ import { EmailModule } from './email/email.module'; import { Module } from '@nestjs/common'; import { NotificationService } from './notification.service'; import { SmsModule } from './sms/sms.module'; +import { ConfigModule } from '@nestjs/config'; +import { emailConfig, smsConfig } from './config'; @Module({ - imports: [EmailModule, SmsModule], + imports: [ + EmailModule, + SmsModule, + ConfigModule.forRoot({ + isGlobal: true, + load: [emailConfig, smsConfig], + }), + ], providers: [ { provide: 'NotificationService', useClass: NotificationService }, ],