mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 02:57:34 +00:00
fad9ea04c7
Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
import {Config} from '../config';
|
|
import sendEmail from './email';
|
|
import sendSlaskMessage from './slack';
|
|
|
|
export default function sendNotification(cartUrl: string) {
|
|
if (Config.notifications.email.username && Config.notifications.email.password) {
|
|
sendEmail(cartUrl);
|
|
}
|
|
|
|
if (Config.notifications.slack.channel && Config.notifications.slack.token) {
|
|
sendSlaskMessage(cartUrl);
|
|
}
|
|
}
|