From 4b7e1b2e3fd7e19eea73c50d1648f627899b6ea4 Mon Sep 17 00:00:00 2001 From: Cute_Wisp Date: Sun, 19 Jan 2025 11:27:58 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/modules/index.ts | 2 ++ src/shared/modules/mailer/mailer.module.ts | 14 +++++++------- src/shared/modules/mailer/mailer.service.ts | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/shared/modules/index.ts b/src/shared/modules/index.ts index 9742bb7..d1becbf 100644 --- a/src/shared/modules/index.ts +++ b/src/shared/modules/index.ts @@ -1,6 +1,7 @@ import { ElasticsearchModule } from "./elasticsearch/elasticsearch.module"; import { JwtModule } from "./jwt/jwt.module"; import { KafkaModule } from "./kafka/kafka.module"; +import { MailerModule } from "./mailer/mailer.module"; import { PassportModule } from "./passport/passport.module"; import { RedisModule } from "./redis/redis.module"; @@ -8,6 +9,7 @@ export { ElasticsearchModule, JwtModule, KafkaModule, + MailerModule, PassportModule, RedisModule }; diff --git a/src/shared/modules/mailer/mailer.module.ts b/src/shared/modules/mailer/mailer.module.ts index b4b996b..5bfbf00 100644 --- a/src/shared/modules/mailer/mailer.module.ts +++ b/src/shared/modules/mailer/mailer.module.ts @@ -1,25 +1,25 @@ import { Module } from "@nestjs/common"; import { ConfigModule } from "@nestjs/config"; -import { MailerModule } from "@nestjs-modules/mailer"; +import { MailerModule as NestMailerModule } from "@nestjs-modules/mailer"; import { MailerConfig } from "@src/config"; import { MailerConfigService } from "@src/config/modules/mailer/mailer.config.service.ts"; -import { MailService } from "./mailer.service"; +import { MailerService } from "./mailer.service"; @Module({ imports: [ ConfigModule.forFeature(MailerConfig), - MailerModule.forRootAsync({ + NestMailerModule.forRootAsync({ imports: [ConfigModule.forFeature(MailerConfig)], useClass: MailerConfigService }) ], providers: [ { - provide: "MailService", - useClass: MailService + provide: "MailerService", + useClass: MailerService } ], - exports: ["MailService"] + exports: ["MailerService"] }) -export class MailModule {} +export class MailerModule {} diff --git a/src/shared/modules/mailer/mailer.service.ts b/src/shared/modules/mailer/mailer.service.ts index 2ccd367..0c864cb 100644 --- a/src/shared/modules/mailer/mailer.service.ts +++ b/src/shared/modules/mailer/mailer.service.ts @@ -1,14 +1,14 @@ import { Inject, Injectable } from "@nestjs/common"; import { ConfigType } from "@nestjs/config"; -import { MailerService } from "@nestjs-modules/mailer"; +import { MailerService as NestMailerService } from "@nestjs-modules/mailer"; import { MailerConfig } from "@src/config"; @Injectable() -export class MailService { +export class MailerService { constructor( @Inject(MailerConfig.KEY) private readonly config: ConfigType, - private readonly mailerService: MailerService + private readonly mailerService: NestMailerService ) {} public sendVerifyMail(to: string): void {