ajax seems to work and we now seem to track completion of challenges

This commit is contained in:
Michael Q Larson
2014-11-06 22:47:35 -08:00
parent 86d433aaba
commit e36a98cf2a
3 changed files with 24 additions and 7 deletions

4
app.js
View File

@@ -166,8 +166,8 @@ app.get('/api/linkedin', passportConf.isAuthenticated, passportConf.isAuthorized
app.get('/api/instagram', passportConf.isAuthenticated, passportConf.isAuthorized, apiController.getInstagram);
app.get('/api/yahoo', apiController.getYahoo);
app.post('/completed_challenge', function(req, res){
req.user.challengesCompleted.push(req)
console.log("pushed #{req} to user");
req.user.challengesCompleted.push(parseInt(req.body.cn));
req.user.save();
});
/**