Merge branch 'develop' into add-flag-to-chat

This commit is contained in:
Blade Barringer
2014-12-23 10:07:42 -06:00
10 changed files with 84 additions and 52 deletions
-1
View File
@@ -207,7 +207,6 @@ api.resetPassword = function(req, res, next){
user.auth.local.hashed_password = hashed_password;
utils.txnEmail(user, 'reset-password', [
{name: "NEW_PASSWORD", content: newPassword},
{name: "URL", content: nconf.get('BASE_URL')},
{name: "USERNAME", content: user.auth.local.username}
]);
user.save(function(err){
+7 -1
View File
@@ -284,7 +284,13 @@ api.cron = function(req, res, next) {
User.findById(user._id, cb);
}
], function(err, saved) {
if(err) logging.loggly({error: "Cron caught", stack: err.stack || err});
if(err) logging.loggly({
error: "Cron caught",
stack: (err.stack || err.message || err),
body: req.body, headers: req.header,
auth: (req.headers['x-api-user'] + ' | ' + req.headers['x-api-key']),
originalUrl: req.originalUrl
});
res.locals.user = saved;
next(err,saved);
user = progress = quest = null;