Skip to content

Commit

Permalink
fix: format fax email for resend notification (#1491)
Browse files Browse the repository at this point in the history
  • Loading branch information
praju-aot authored Jul 17, 2024
1 parent 4706ef4 commit a73c702
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ import { CreateNotificationDto } from '../../common/dto/request/create-notificat
import { ReadNotificationDto } from '../../common/dto/response/read-notification.dto';
import { DataNotFoundException } from '../../../common/exception/data-not-found.exception';
import { NotificationType } from '../../../common/enum/notification-type.enum';
import { validateEmailandFaxList } from '../../../common/helper/notification.helper';
import {
generateFaxEmail,
validateEmailandFaxList,
} from '../../../common/helper/notification.helper';

@Injectable()
export class PermitService {
Expand Down Expand Up @@ -702,10 +705,14 @@ export class PermitService {
NotificationType.EMAIL_PERMIT,
)
) {
const faxEmailList = createNotificationDto.fax?.map((fax) =>
generateFaxEmail(fax),
);

notificationDocument = {
templateName: NotificationTemplate.ISSUE_PERMIT,
to: validateEmailandFaxList(createNotificationDto.to),
fax: validateEmailandFaxList(createNotificationDto.fax),
fax: validateEmailandFaxList(faxEmailList),
subject: `onRouteBC Permits - ${companyInfo.legalName}`,
documentIds: [permitDocumentId],
};
Expand Down

0 comments on commit a73c702

Please sign in to comment.