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 61198af commit 1573e76Copy full SHA for 1573e76
backend/question/src/services/post/index.ts
@@ -32,7 +32,7 @@ export const updateQuestionService = async (payload: IUpdateQuestionPayload) =>
32
difficulty: payload.difficulty,
33
topic: payload.topics.map(String),
34
})
35
- .where(eq(questions.id, String(payload.id)))
+ .where(eq(questions.id, Number(payload.id)))
36
.returning();
37
38
if (!updatedQuestion) {
@@ -50,7 +50,7 @@ export const deleteQuestionService = async (payload: IDeleteQuestionPayload) =>
50
try {
51
const [deletedQuestion] = await db
52
.delete(questions)
53
+ .where(eq(questions.id, payload.id))
54
55
56
if (!deletedQuestion) {
0 commit comments