tweaks and refactoring for #2774

This commit is contained in:
Julian Lam
2015-02-25 14:10:00 -05:00
parent 3202a52a61
commit 55262b399a
4 changed files with 12 additions and 14 deletions

View File

@@ -119,9 +119,10 @@ Controllers.register = function(req, res, next) {
Controllers.confirmEmail = function(req, res, next) {
user.email.confirm(req.params.code, function (data) {
data.status = data.status === 'ok';
res.render('confirm', data);
user.email.confirm(req.params.code, function (err) {
res.render('confirm', {
error: err ? err.message : ''
});
});
};