🐛 Fixed missing code in sqlite3 session repository output
This commit is contained in:
parent
8bee5c8559
commit
2a6c3a3447
|
@ -77,6 +77,8 @@ func (repo *sqlite3SessionRepository) Get(ctx context.Context, code string) (*do
|
|||
return nil, fmt.Errorf("cannot decode session data from store: %w", err)
|
||||
}
|
||||
|
||||
result.Code = code
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
@ -116,6 +118,8 @@ func (repo *sqlite3SessionRepository) GetAndDelete(ctx context.Context, code str
|
|||
return nil, fmt.Errorf("cannot decode session data from store: %w", err)
|
||||
}
|
||||
|
||||
result.Code = code
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ func TestCreate(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
session := domain.TestSession(t)
|
||||
session.Profile = nil
|
||||
|
||||
model, err := repository.NewSession(session)
|
||||
if err != nil {
|
||||
|
@ -47,6 +48,7 @@ func TestGet(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
session := domain.TestSession(t)
|
||||
session.Profile = nil
|
||||
|
||||
model, err := repository.NewSession(session)
|
||||
if err != nil {
|
||||
|
@ -81,6 +83,7 @@ func TestGetAndDelete(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
session := domain.TestSession(t)
|
||||
session.Profile = nil
|
||||
|
||||
model, err := repository.NewSession(session)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue