MinimongoError: The positional operator did not find the match needed from the query
this error when i build and Run it with PM2 and Mongo
progress[userIndex].userId = course.userId
progress[userIndex].units[unitIndex].unitId = course.unitId
progress[userIndex].units[unitIndex].isLast = course.isLast
progress[userIndex].units[unitIndex].isQuiz = course.isQuiz
progress[userIndex].units[unitIndex].isFinalQuiz = course.isFinalQuiz
progress[userIndex].units[unitIndex].questions = course.questions
progress[userIndex].units[unitIndex].at = new Date()
console.log("progress", progress)
return Courses.update({
_id: course.courseId
}, {
$set: {
users: progress
}
})