Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -6140,12 +6140,18 @@ func GetOpenApiDatastore(ctx context.Context, id string) (ParsedOpenApi, error)
}

// Index = Username
func SetSession(ctx context.Context, user User, value string) error {
func SetSession(ctx context.Context, user *User, value string) error {
//parsedKey := strings.ToLower(user.Username)
// Non indexed User data
parsedKey := user.Id
user.Session = value

now := time.Now().Unix()
if user.SessionCreatedAt == 0 {
user.SessionCreatedAt = now
}
user.SessionLastActivityAt = now

nameKey := "Users"
if project.DbType == "opensearch" {
data, err := json.Marshal(user)
Expand Down
Loading
Loading