Fix session touch

This commit is contained in:
Shane Kilkelly 2016-09-22 13:48:09 +01:00
parent 7f24dd6f55
commit 6df569253a

View file

@ -109,8 +109,8 @@ passport.deserializeUser(AuthenticationController.deserializeUser)
# Measure expiry from last request, not last login
webRouter.use (req, res, next) ->
req.session.touch()
if req?.session?.user?
UserSessionsManager.touch(req.user, (err)->)
if AuthenticationController.isUserLoggedIn(req)
UserSessionsManager.touch(AuthenticationController.getSessionUser(req), (err)->)
next()
webRouter.use ReferalConnect.use