2016-06-23 15:00:58 +09:00
|
|
|
import Users from './collection.js';
|
2016-06-23 16:42:06 +09:00
|
|
|
import NovaEmail from 'meteor/nova:email';
|
2016-06-23 15:00:58 +09:00
|
|
|
|
2016-04-13 12:34:41 +09:00
|
|
|
const getUser = (userId) => {
|
|
|
|
return typeof Users.findOne(userId) === "undefined" ? Users.findOne() : Users.findOne(userId);
|
|
|
|
};
|
|
|
|
|
2016-06-23 16:42:06 +09:00
|
|
|
NovaEmail.addEmails({
|
2016-04-13 11:39:01 +09:00
|
|
|
|
|
|
|
newUser: {
|
|
|
|
template: "newUser",
|
|
|
|
path: "/email/new-user/:_id?",
|
|
|
|
getProperties: Users.getNotificationProperties,
|
|
|
|
subject() {
|
|
|
|
return "A new user has been created";
|
|
|
|
},
|
2016-04-13 12:34:41 +09:00
|
|
|
getTestObject: getUser
|
2016-04-13 11:39:01 +09:00
|
|
|
},
|
|
|
|
|
|
|
|
accountApproved: {
|
|
|
|
template: "accountApproved",
|
|
|
|
path: "/email/account-approved/:_id?",
|
|
|
|
getProperties: Users.getNotificationProperties,
|
|
|
|
subject() {
|
|
|
|
return "Your account has been approved.";
|
|
|
|
},
|
2016-04-13 12:34:41 +09:00
|
|
|
getTestObject: getUser
|
2016-04-13 11:39:01 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|