Apply template string

This commit is contained in:
Ken Cheung
2015-10-07 13:44:33 +08:00
parent e51932cb1e
commit 012ea238fd
2 changed files with 9 additions and 8 deletions

View File

@@ -7,14 +7,14 @@ function greet(welcomeMsg) {
return function(user, url) {
var greeting = (user.profile && user.profile.name) ?
("Hello " + user.profile.name + ",") : "Hello,";
return greeting + "\n"
+ "\n"
+ welcomeMsg
+ ", simply click the link below.\n"
+ "\n"
+ url + "\n"
+ "\n"
+ "Thanks.\n";
return `${greeting}
${welcomeMsg}, simply click the link below.
url
Thanks.
`;
}
};
}

View File

@@ -21,6 +21,7 @@ Package.onUse(function(api) {
api.use('random', ['server']);
api.use('check');
api.use('underscore');
api.use('ecmascript');
api.addFiles('email_templates.js', 'server');
api.addFiles('password_server.js', 'server');