diff --git a/src/main/scala/gitbucket/core/servlet/ApiAuthenticationFilter.scala b/src/main/scala/gitbucket/core/servlet/ApiAuthenticationFilter.scala index cca7d7b..4576b0c 100644 --- a/src/main/scala/gitbucket/core/servlet/ApiAuthenticationFilter.scala +++ b/src/main/scala/gitbucket/core/servlet/ApiAuthenticationFilter.scala @@ -28,8 +28,11 @@ .orElse { Option(request.getSession.getAttribute(Keys.Session.LoginAccount).asInstanceOf[Account]).map(Right(_)) } match { - case Some(Right(account)) => request.setAttribute(Keys.Session.LoginAccount, account); chain.doFilter(req, res) - case None => chain.doFilter(req, res) + case Some(Right(account)) => + request.setAttribute(Keys.Session.LoginAccount, account) + updateLastLoginDate(account.userName) + chain.doFilter(req, res) + case None => chain.doFilter(req, res) case Some(Left(_)) => { response.setStatus(HttpServletResponse.SC_UNAUTHORIZED) response.setContentType("application/json; charset=utf-8")