From b41712ef8617a62420d9a545592f82cd5c8b5c06 Mon Sep 17 00:00:00 2001 From: Min Khant Aung Date: Fri, 16 Jun 2023 03:25:56 -0700 Subject: [PATCH] ALL DONE! READY FOR DEMO --- models/course.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/course.js b/models/course.js index d019595..4d2ae52 100644 --- a/models/course.js +++ b/models/course.js @@ -42,11 +42,12 @@ async function getCoursePage(page) { const results = await collection .find({}, { student: 0, assignment: 0 }) + .project({student: 0}) .sort({ _id: 1 }) .skip(offset) .limit(pageSize) .toArray(); - + return { courses: results, page: page,