Skip to content

Commit

Permalink
fix service for quiz type (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrth25 authored Dec 19, 2023
1 parent 2f6b064 commit 71684f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 71684f4

Please sign in to comment.