Skip to content

Commit f629d13

Browse files
committed
Add some test cases
1 parent 034f45d commit f629d13

File tree

2 files changed

+704
-16
lines changed

2 files changed

+704
-16
lines changed

services/question/src/controllers/questionController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export const addQuestion = async (req: Request, res: Response) => {
161161
const existingQuestion = await Question.findOne({
162162
$or: [{ title: title }, { description: description }],
163163
}).collation({ locale: 'en', strength: 2 });
164+
console.log('existingQuestion:', existingQuestion);
164165
if (existingQuestion) {
165166
return handleBadRequest(res, `A question with the same title or description already exists.`);
166167
}

0 commit comments

Comments
 (0)