Fix cached session bug
This commit is contained in:
parent
1f3e1d3074
commit
4d95fddb1b
|
|
@ -126,6 +126,7 @@ func (s *PGStore) Save(r *http.Request, w http.ResponseWriter, session *sessions
|
||||||
}
|
}
|
||||||
|
|
||||||
result := s.db.Where("token = ?", session.ID).Assign(models.Session{
|
result := s.db.Where("token = ?", session.ID).Assign(models.Session{
|
||||||
|
UserID: userID,
|
||||||
Data: buf.Bytes(),
|
Data: buf.Bytes(),
|
||||||
ExpiresAt: expiresAt,
|
ExpiresAt: expiresAt,
|
||||||
}).FirstOrCreate(&dbSession)
|
}).FirstOrCreate(&dbSession)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue