From 77d5ff9a01f27a05415d16ec00a2d8756ddaa6db Mon Sep 17 00:00:00 2001 From: C4 Patino Date: Thu, 18 Aug 2022 16:54:23 -0400 Subject: [PATCH] Fixed create question --- server/routes/question/CreateQuestion.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/routes/question/CreateQuestion.js b/server/routes/question/CreateQuestion.js index af9ab0f..decd845 100644 --- a/server/routes/question/CreateQuestion.js +++ b/server/routes/question/CreateQuestion.js @@ -21,7 +21,11 @@ async function CreateQuestion(req, res) { if (!success) return res.status(500).send(config.errorGeneric); - const newQuestion = await Question.create({ ...question, tags, _id: question.question_id }); + const newQuestion = await Question.create({ + ...question, + tags: tags.split(' '), + _id: question.question_id, + }); // Increment user points by 1 await createRequest('patch', `/users/${user.username}/points`, {