summaryrefslogtreecommitdiff
path: root/bucky/app/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app/router.js')
-rw-r--r--bucky/app/router.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/bucky/app/router.js b/bucky/app/router.js
index 0935f1a..dfec166 100644
--- a/bucky/app/router.js
+++ b/bucky/app/router.js
@@ -73,6 +73,7 @@ module.exports = function(app){
app.get("/api/user/:username",
middleware.ensureAuthenticated,
bucky.ensureUser,
+ bucky.sanitizeUser,
function(req, res) {
res.json(res.user)
}
@@ -82,7 +83,10 @@ module.exports = function(app){
bucky.ensureUser,
bucky.checkUserPrivacy,
multer.single("avatar"),
- bucky.updateUser,
+ bucky.updateProfile,
+ bucky.changePassword,
+ bucky.uploadAvatar,
+ bucky.saveUser,
function(req, res){
res.json(res.thread)
})