Explorar o código

Add error handling on logout

Alasdair Smith %!s(int64=8) %!d(string=hai) anos
pai
achega
53bd2cfd33

+ 2 - 1
services/web/app/coffee/Features/User/UserController.coffee

@@ -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) ->)->