-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: 519 question match words #316
feat: 519 question match words #316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ 🥇
.where(eq(questions.lessonId, lessonId)); | ||
} | ||
|
||
async upsertOptions(questionId: UUIDType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not a upsert method
.where(inArray(questionAnswerOptions.questionId, questionsToDelete)); | ||
} | ||
|
||
async upsertQuestion(questionData: QuestionBody, lessonId: UUIDType, authorId: UUIDType, questionId?: UUIDType): Promise<UUIDType> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe can we use drizzle upsert to do it?
await db.insert(users)
.values({ id: 1, name: 'Dan' })
.onConflictDoUpdate({ target: users.id, set: { name: 'John' } });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job with extracted DB methods to Repository, but I think that we need to use trx and provide it to call of method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍻
Jira issue(s)
https://selleolabs.atlassian.net/browse/LC-519
Overview
Add new quiz type -> match words