diff --git a/dal/db_query/queries.sql b/dal/db_query/queries.sql index bbd9dc4..5e855cf 100644 --- a/dal/db_query/queries.sql +++ b/dal/db_query/queries.sql @@ -632,7 +632,7 @@ SELECT (SELECT result_count FROM Results) AS results; -- name: GetListStartQuiz :many -SELECT id FROM quiz WHERE accountid = '654a8909725f47e926f0bebc' AND status = 'start'; +SELECT id FROM quiz WHERE accountid = $1 AND status = 'start'; -- name: GetListCreatedQuizzes :many SELECT id diff --git a/dal/sqlcgen/queries.sql.go b/dal/sqlcgen/queries.sql.go index fc66aab..fbf3b76 100644 --- a/dal/sqlcgen/queries.sql.go +++ b/dal/sqlcgen/queries.sql.go @@ -934,11 +934,11 @@ func (q *Queries) GetListCreatedQuizzes(ctx context.Context, accountid string) ( } const getListStartQuiz = `-- name: GetListStartQuiz :many -SELECT id FROM quiz WHERE accountid = '654a8909725f47e926f0bebc' AND status = 'start' +SELECT id FROM quiz WHERE accountid = $1 AND status = 'start' ` -func (q *Queries) GetListStartQuiz(ctx context.Context) ([]int64, error) { - rows, err := q.db.QueryContext(ctx, getListStartQuiz) +func (q *Queries) GetListStartQuiz(ctx context.Context, accountid string) ([]int64, error) { + rows, err := q.db.QueryContext(ctx, getListStartQuiz, accountid) if err != nil { return nil, err }