We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3019c7 commit 66d756aCopy full SHA for 66d756a
backend/user/src/services/questions/index.ts
@@ -25,7 +25,7 @@ export const addAttemptedQuestionService = async (
25
const userRecords = await db
26
.select({ id: users.id, attemptedQuestions: users.attemptedQuestions })
27
.from(users)
28
- .where(sql`${users.username} = ANY(${userIds})`);
+ .where(sql`${users.id} = ANY(${userIds})`);
29
30
if (userRecords.length === 0) {
31
return {
@@ -72,7 +72,7 @@ export const getAttemptedQuestionsService = async (
72
const result = await db
73
.select({ attemptedQuestions: users.attemptedQuestions })
74
75
- .where(eq(users.username, userId))
+ .where(eq(users.id, userId))
76
.limit(1);
77
78
if (result.length === 0) {
0 commit comments