Skip to content

Commit

Permalink
Merge pull request #15 from kushwahramkumar2003/ram
Browse files Browse the repository at this point in the history
Ram
  • Loading branch information
kushwahramkumar2003 authored Nov 28, 2023
2 parents 8bee81c + d1685bf commit 771af2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Server/src/controllers/quiz.controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ exports.getQuizResults = asyncHandler(async (req, res) => {
return res.status(404).json({ message: "Quiz not found" });
}

const results = await Result.find({ quiz: quiz._id }).populate(
const results = await QuizResult.find({ quiz: quiz._id }).populate(
"user",
"name email"
);
Expand Down Expand Up @@ -452,7 +452,7 @@ exports.submitQuizOnTimeUp = asyncHandler(async (req, res) => {
exports.getQuizResultsForUser = asyncHandler(async (req, res) => {
try {
const { id, userId } = req.params;
const quizResults = await QuizResults.findOne({
const quizResults = await QuizResult.findOne({
quiz: id,
user: userId,
}).populate("quiz", "title");
Expand All @@ -474,7 +474,7 @@ exports.getQuizResultsForUser = asyncHandler(async (req, res) => {
exports.getAllResultsForQuiz = asyncHandler(async (req, res) => {
try {
const { id } = req.params;
const quizResults = await QuizResults.find({ quiz: id }).populate(
const quizResults = await QuizResult.find({ quiz: id }).populate(
"user",
"name email"
);
Expand Down

0 comments on commit 771af2d

Please sign in to comment.