Add error handling on logout

This commit is contained in:
Alasdair Smith 2018-09-03 11:46:36 +01:00
parent 6569e34873
commit 53bd2cfd33

View file

@ -133,8 +133,9 @@ module.exports = UserController =
SudoModeHandler.clearSudoMode(user._id)
cb()
logout : (req, res)->
logout : (req, res, next)->
UserController._doLogout req, (err) ->
return next(err) if err?
res.redirect '/login'
register : (req, res, next = (error) ->)->