Skip to content

Commit

Permalink
Fix problem of buggy add question
Browse files Browse the repository at this point in the history
  • Loading branch information
zzthian committed Nov 1, 2023
1 parent 15b582a commit 88dd694
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/question-backend/controller/addQuestion.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function addQuestion (req, res) {
return
}
try {
console.log(req.body)

const question = new Question({
id: req.body.id,
Expand All @@ -14,6 +15,7 @@ export async function addQuestion (req, res) {
categories: req.body.categories,
complexity: req.body.complexity,
})
await question.save();
res.send("Success")
} catch (error) {
console.log(error)
Expand Down

0 comments on commit 88dd694

Please sign in to comment.