fix(backend-pg): userID is nullable
This commit is contained in:
parent
c087639a68
commit
0b246a0f0d
3 changed files with 4 additions and 3 deletions
2
backend/pkg/db/cache/messages_common.go
vendored
2
backend/pkg/db/cache/messages_common.go
vendored
|
|
@ -36,7 +36,7 @@ func (c *PGCache) InsertUserID(sessionID uint64, userID *IOSUserID) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
session.UserID = userID.Value
|
||||
session.UserID = &userID.Value
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
2
backend/pkg/db/cache/messages_web.go
vendored
2
backend/pkg/db/cache/messages_web.go
vendored
|
|
@ -29,7 +29,7 @@ func (c *PGCache) InsertWebSessionStart(sessionID uint64, s *SessionStart) error
|
|||
UserDeviceType: s.UserDeviceType,
|
||||
UserDeviceMemorySize: s.UserDeviceMemorySize,
|
||||
UserDeviceHeapSize: s.UserDeviceHeapSize,
|
||||
UserID: s.UserID,
|
||||
UserID: &s.UserID,
|
||||
}
|
||||
if err := c.Conn.InsertSessionStart(sessionID, c.sessions[sessionID]); err != nil {
|
||||
c.sessions[sessionID] = nil
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ type Session struct {
|
|||
PagesCount int
|
||||
EventsCount int
|
||||
ErrorsCount int
|
||||
UserID string // pointer??
|
||||
|
||||
UserID *string // pointer??
|
||||
UserAnonymousID *string
|
||||
Metadata1 *string
|
||||
Metadata2 *string
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue