fix: refs for cassandra db
This commit is contained in:
@@ -11,11 +11,9 @@ import (
|
||||
// AddSession to save session information in database
|
||||
func (p *provider) AddSession(ctx context.Context, session *models.Session) error {
|
||||
collection := p.db.Table(models.Collections.Session)
|
||||
|
||||
if session.ID == "" {
|
||||
session.ID = uuid.New().String()
|
||||
}
|
||||
|
||||
session.CreatedAt = time.Now().Unix()
|
||||
session.UpdatedAt = time.Now().Unix()
|
||||
err := collection.Put(session).RunWithContext(ctx)
|
||||
|
Reference in New Issue
Block a user