Fixed create question
This commit is contained in:
parent
9dcb13d516
commit
77d5ff9a01
1 changed files with 5 additions and 1 deletions
|
|
@ -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`, {
|
||||
|
|
|
|||
Reference in a new issue