Skip to content

Commit

Permalink
kyc/quiz: fix get/set
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-dionysos committed Jan 14, 2024
1 parent c90d491 commit 01a8740
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kyc/quiz/quiz.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (r *repositoryImpl) SkipQuizSession(ctx context.Context, userID UserID) err
err := storage.DoInTransaction(ctx, r.DB, func(tx storage.QueryExecer) error {
now := time.Now()

data, err := storage.Get[struct {
data, err := storage.ExecOne[struct {
StartedAt *time.Time `db:"started_at"`
Finished bool `db:"finished"`
Success bool `db:"ended_successfully"`
Expand Down Expand Up @@ -285,7 +285,7 @@ func (r *repositoryImpl) StartQuizSession(ctx context.Context, userID UserID, la
full outer join session_upsert on true
`

data, err := storage.Get[struct {
data, err := storage.ExecOne[struct {
FailedAt *time.Time `db:"failed_at"`
ActiveStartedAt *time.Time `db:"active_started_at"`
ActiveDeadline *time.Time `db:"active_deadline"`
Expand Down Expand Up @@ -445,7 +445,7 @@ where
returning answers
`

data, err := storage.Get[userProgress](ctx, tx, stmt, userID, answer)
data, err := storage.ExecOne[userProgress](ctx, tx, stmt, userID, answer)
if err != nil {
if errors.Is(err, storage.ErrNotFound) {
return nil, ErrUnknownSession
Expand Down

0 comments on commit 01a8740

Please sign in to comment.