From 2317eef0b983c1e21cf7be27c172cbc533701c51 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 11 Jan 2018 15:03:35 +0100 Subject: fix pw --- bucky/util/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucky/util/auth.js b/bucky/util/auth.js index ad8ce14..624c898 100644 --- a/bucky/util/auth.js +++ b/bucky/util/auth.js @@ -161,7 +161,7 @@ var auth = module.exports = { var username = req.user.get('username') var newPassword = auth.makePassword(username, req.body.newpassword) res.user.set('password', newPassword) - next() + res.user.save().then(() => next()).catch(err => res.send({ error: err })) }, verifyLocalUser: function (username, password, done) { -- cgit v1.2.3-70-g09d2