Skip to content

Commit

Permalink
Added fields to getQuizById (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAfonina authored Nov 17, 2023
1 parent 5f14954 commit 406547c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const quizService = {
},

getQuizById: async (id) => {
return await Quiz.findById(id).lean().exec()
return await Quiz.findById(id).populate({ path: 'items', select: 'title answers text' }).lean().exec()
},

createQuiz: async (author, data) => {
Expand Down

0 comments on commit 406547c

Please sign in to comment.