All files / src/messager mfa-sms.sms.ts

36% Statements 9/25
50% Branches 9/18
9.09% Functions 1/11
45% Lines 9/20

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  7x                 7x 7x   7x 7x
import { HBSTemplates } from '@/services/handlebars.service';
import { InternalMessager } from './index.mailer';
import appConfig from '@/config/app.config';

export class MFAMessageMailer extends InternalMessager {
  constructor(protected receiver: string) {
    super([receiver], `Your One-Time Password (OTP) for Secure Access to ${appConfig.appName}`);
  }
 
  async generate(body: { name: string; OTP: string; validationPeriod: string }) {
    await this.generateMail(HBSTemplates.OTP_SMS, body);
    return this;
  }
}