work with @brndnb to improve usability of completion modals and write client-side jquery to prevent post if user isn't authenticated, which fixes a javascript error we were experiencing on serverside

This commit is contained in:
Michael Q Larson
2015-01-18 13:34:45 -08:00
parent 1e427d723c
commit f6603aadae
4 changed files with 19 additions and 14 deletions

2
app.js
View File

@ -271,7 +271,7 @@ app.get('/account/unlink/:provider', userController.getOauthUnlink);
* and updates user.challengesHash & user.challengesCompleted
*
*/
app.post('/completed_challenge', function (req, res) {
app.post('/completed-challenge', function (req, res) {
req.user.challengesHash[parseInt(req.body.challengeNumber)] =
Math.round(+new Date() / 1000);
var ch = req.user.challengesHash;