16 lines
604 B
JavaScript
16 lines
604 B
JavaScript
/**
|
|
* @file This file wraps the functions in mailer.js with promises for simpler
|
|
* use in promises and async/await
|
|
*/
|
|
|
|
const Q = require('q');
|
|
const mailer = require('./mailer.js');
|
|
|
|
module.exports = {
|
|
sendEmail: (...args) => Q.nfapply(mailer.sendEmail, args),
|
|
sendEmailByID: (...args) => Q.nfapply(mailer.sendEmailByID, args),
|
|
sendWelcomeEmail: (...args) => Q.nfapply(mailer.sendWelcomeEmail, args),
|
|
sendEmailChangedEmails: (...args) => Q.nfapply(mailer.sendEmailChangedEmails, args),
|
|
sendEmailRevertedEmails: (...args) => Q.nfapply(mailer.sendEmailRevertedEmails, args)
|
|
};
|