@programisto/edrm-exams 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -308,7 +308,7 @@ class ExamsRouter extends EnduranceRouter {
|
|
|
308
308
|
return res.status(404).json({ message: 'Test not found' });
|
|
309
309
|
}
|
|
310
310
|
for (let i = 0; i < test.questions.length; i++) {
|
|
311
|
-
await TestQuestion.findByIdAndDelete(test.questions[i]);
|
|
311
|
+
await TestQuestion.findByIdAndDelete(test.questions[i].questionId);
|
|
312
312
|
}
|
|
313
313
|
await TestResult.deleteMany({ testId: id });
|
|
314
314
|
await Test.findByIdAndDelete(id);
|