diff --git a/apxtri/routes/notifications.js b/apxtri/routes/notifications.js index a71e483..15db4b7 100644 --- a/apxtri/routes/notifications.js +++ b/apxtri/routes/notifications.js @@ -83,7 +83,7 @@ router.post( );*/ let sendret; if (req.body.emailsto && req.body.emailsto.length > 0) { - const sendcampain = Notifications.manageemail( + const sendcampain = await Notifications.manageemail( req.body.emailsto, req.params.template, req.params.tribe, @@ -104,7 +104,7 @@ router.post( const newk= (k=="Cc")?"cc":k; campain.emailsto[0][newk]=req.body[k] }) - sendret = Notifications.manageemail( + sendret = await Notifications.manageemail( campain, req.params.template, req.params.tribe,