Skip to content

Commit

Permalink
fix(controller): Fixed editing of users not correctly updating the se…
Browse files Browse the repository at this point in the history
…ssion afterwards
  • Loading branch information
pilsy committed Jun 12, 2015
1 parent 81f6eb0 commit d38e8db
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,16 @@ module.exports = function(config, Controller, Promise, UserService, AccountContr
promise = UserService.update(underscore.omit(this.req.body, 'id', 'createdAt', 'updatedAt'), findOptions);
}

promise.then(this.proxy(AuthController.updateSession)).catch(this.proxy('handleServiceMessage'));
promise
.then(function(user) {
return UserService.find({
where: {
id: user.id
}
});
})
.then(this.proxy(AuthController.updateSession))
.catch(this.proxy('handleServiceMessage'));
},

deleteAction: function() {
Expand Down

0 comments on commit d38e8db

Please sign in to comment.