Browse Source

Fixed user.Session being unset on subsequent requests

master
Gisle Aune 7 years ago
parent
commit
895d831107
  1. 4
      router.go

4
router.go

@ -57,6 +57,10 @@ func (router *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
sess = auth.FindSession(cookie.Value)
if sess != nil {
user, _ = auth.FindUser(sess.UserID)
if user != nil {
user.Session = sess
}
}
}

Loading…
Cancel
Save