Finishing up pathing issues, writing user object if they haven't visited in a day

This commit is contained in:
Nathan Leniz
2015-01-27 17:39:53 -05:00
parent 504838083e
commit 01bdbd8f4d
3 changed files with 12 additions and 12 deletions

7
app.js
View File

@ -352,11 +352,9 @@ app.post('/completed-bonfire/', function (req, res) {
solution: isSolution
})
debug('saving user with a pair');
req.user.save();
pairedWith.save();
res.redirect('/bonfires');
}
})
} else {
@ -372,9 +370,10 @@ app.post('/completed-bonfire/', function (req, res) {
if (index > -1) {
req.user.uncompletedBonfires.splice(index,1)
}
debug("Saving user without a pair");
req.user.save();
res.redirect('/bonfires');
}
});
/**