Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kyc/quiz: fix get/set #90

Merged
merged 1 commit into from
Jan 14, 2024
Merged
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
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
Loading