diff --git a/controllers/profiles.js b/controllers/profiles.js index 97342dd..330e58d 100644 --- a/controllers/profiles.js +++ b/controllers/profiles.js @@ -13,5 +13,11 @@ module.exports = function(app) { return res.apiSuccess(profile); }); }); + app.put('/api/profiles/:profileid', auth.check(), function(req, res) { + Profile.findByIdAndUpdate(req.params.profileid, req.body, function (err, profile) { + if (err) return handleError(err); + return res.apiSuccess("Your profile has been updated", profile); + }); +}); +}; -}; \ No newline at end of file diff --git a/public/dist/app.js b/public/dist/app.js index 383dd02..7444d64 100644 --- a/public/dist/app.js +++ b/public/dist/app.js @@ -1,5 +1,5 @@ /** - * internlabs - v0.1.0 - 2014-04-10 + * internlabs - v0.1.0 - 2014-04-11 * */ /**