feat: add logger
This commit is contained in:
parent
a4b9f46afd
commit
8525c1c1af
@ -1,10 +1,12 @@
|
||||
import { MailerService } from '@nestjs-modules/mailer'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { Injectable, Logger } from '@nestjs/common'
|
||||
|
||||
import { TemplateService } from './template.service'
|
||||
|
||||
@Injectable()
|
||||
export class MailService {
|
||||
private readonly logger = new Logger(MailService.name)
|
||||
|
||||
constructor(
|
||||
private readonly transporter: MailerService,
|
||||
private readonly templateService: TemplateService
|
||||
@ -18,6 +20,7 @@ export class MailService {
|
||||
subject: 'Ваш код подтверждения',
|
||||
html
|
||||
})
|
||||
this.logger.log(`Send OTP to ${email}`)
|
||||
}
|
||||
|
||||
public async sendEmailChange(email: string, code: string) {
|
||||
@ -27,5 +30,6 @@ export class MailService {
|
||||
subject: 'Подтверждение смены почты',
|
||||
html
|
||||
})
|
||||
this.logger.log(`Send email change to ${email}`)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user