chore(notification): warn user of improper sms and email config (#259)

This commit is contained in:
Vincent
2020-09-23 22:01:31 -04:00
committed by GitHub
parent 9f470f06e9
commit ab61a98bea
+4
View File
@@ -4,6 +4,10 @@ import {Config} from '../config';
import Mail from 'nodemailer/lib/mailer'; import Mail from 'nodemailer/lib/mailer';
import nodemailer from 'nodemailer'; import nodemailer from 'nodemailer';
if (Config.notifications.phone.number && !Config.notifications.email.username) {
Logger.warn('✖ in order to recieve sms alerts, email notifications must also be configured');
}
const [email, phone] = [Config.notifications.email, Config.notifications.phone]; const [email, phone] = [Config.notifications.email, Config.notifications.phone];
const transporter = nodemailer.createTransport({ const transporter = nodemailer.createTransport({