fix nonprofit form and fix some mistakes in video links

This commit is contained in:
Michael Q Larson
2014-11-04 14:57:00 -08:00
parent 86129e3b6f
commit 80fbe1dee4
9 changed files with 123 additions and 123 deletions

View File

@ -122,6 +122,34 @@ exports.getAccount = function(req, res) {
});
};
/**
* POST /update-progress
* Update profile information.
*/
exports.updateProgress = function(req, res) {
User.findById(req.user.id, function(err, user) {
if (err) return next(err);
user.email = req.body.email || '';
user.profile.name = req.body.name || '';
user.profile.gender = req.body.gender || '';
user.profile.location = req.body.location || '';
user.profile.website = req.body.website || '';
user.save(function(err) {
if (err) return next(err);
req.flash('success', { msg: 'Profile information updated.' });
res.redirect('/account');
});
});
// challenge = req.params.challengeNumber;
// user.challengesCompleted
};
/**
* POST /account/profile
* Update profile information.