From 88dd694696726736564907118847291f257b4d23 Mon Sep 17 00:00:00 2001 From: zzthian Date: Wed, 1 Nov 2023 23:35:59 +0800 Subject: [PATCH] Fix problem of buggy add question --- backend/question-backend/controller/addQuestion.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/question-backend/controller/addQuestion.js b/backend/question-backend/controller/addQuestion.js index 106b37fc..18172b2e 100644 --- a/backend/question-backend/controller/addQuestion.js +++ b/backend/question-backend/controller/addQuestion.js @@ -6,6 +6,7 @@ export async function addQuestion (req, res) { return } try { + console.log(req.body) const question = new Question({ id: req.body.id, @@ -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)