Merge pull request #19 from fossyy/staging

Set proper creation timestamp for user sessions
This commit is contained in:
2024-05-05 18:14:24 +07:00
committed by GitHub

View File

@ -84,8 +84,9 @@ func Get(id string) (*Session, error) {
func Create() *Session {
id := utils.GenerateRandomString(128)
session := &Session{
ID: id,
Values: make(map[string]interface{}),
ID: id,
CreateTime: time.Now(),
Values: make(map[string]interface{}),
}
GlobalSessionStore[id] = session
return session