Skip to content

Commit

Permalink
Add start time to login session
Browse files Browse the repository at this point in the history
  • Loading branch information
giftkugel committed Sep 12, 2024
1 parent 7a4fd55 commit 16823e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/manager/session/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
)

type LoginSession struct {
Id string
Username string
Id string
Username string
StartTime time.Time
}

type loginManager struct {
Expand Down Expand Up @@ -44,6 +45,7 @@ func GetLoginSessionManagerInstance() LoginManager[LoginSession] {

func (loginManager *loginManager) StartSession(loginSession *LoginSession) {
loginSessionStore := *loginManager.loginSessionStore
loginSession.StartTime = time.Now()
loginSessionStore.Set(loginSession.Id, loginSession)
}

Expand Down

0 comments on commit 16823e2

Please sign in to comment.