diff --git a/api/src/api/me.js b/api/src/api/me.js index 765474a..dc27af7 100644 --- a/api/src/api/me.js +++ b/api/src/api/me.js @@ -195,10 +195,10 @@ module.exports = { if (responses.length !== quiz.content.length) return res.json({ error: 'invalid_params' }) - await db.table.quizs().updateOne({ _id: quiz._id }, { $set: { responses } }) html = quizResponseBuild(responses) if (html === false) return res.json({ error: 'invalid_params' }) + await db.table.quizs().updateOne({ _id: quiz._id }, { $set: { responses } }) await sendNote(apID(res.locals.user.username), quiz.from, html, function(o){ o.object.inReplyTo = quiz.replyTo; return o })