From 71684f499e724af5db22d37978630c2bd9b77c63 Mon Sep 17 00:00:00 2001 From: dmtrth25 <56305508+dmtrth25@users.noreply.github.com> Date: Tue, 19 Dec 2023 13:17:23 +0200 Subject: [PATCH] fix service for quiz type (#670) --- services/quiz.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/quiz.js b/services/quiz.js index e15d668d..c4d6f586 100644 --- a/services/quiz.js +++ b/services/quiz.js @@ -17,7 +17,10 @@ const quizService = { }, getQuizById: async (id) => { - return await Quiz.findById(id).populate({ path: 'items', select: 'title answers text' }).lean().exec() + return await Quiz.findById(id) + .populate({ path: 'items', select: 'title answers text type' }) + .lean() + .exec() }, createQuiz: async (author, data) => {