fix: refs for cassandra db

This commit is contained in:
Lakhan Samani
2023-08-01 16:09:17 +05:30
parent 15a4be5431
commit c2defdbaac
47 changed files with 103 additions and 255 deletions

View File

@@ -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)