From 003a0fc2799fd5495f01a9c592f6d8fb92c94c65 Mon Sep 17 00:00:00 2001 From: sharjeel khan Date: Tue, 31 May 2022 14:54:17 +0500 Subject: [PATCH] attendance controller changes new route --- backend/controllers/attendance_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/controllers/attendance_controller.js b/backend/controllers/attendance_controller.js index 2915c6a..2f50875 100644 --- a/backend/controllers/attendance_controller.js +++ b/backend/controllers/attendance_controller.js @@ -785,7 +785,7 @@ module.exports.GetReportDailyAtt = async (req, res) => { }) } module.exports.GetLastReport = async (req, res) => { - const aggr = [ + const reportagg = [ { '$match': { 'UserID': req.body.UserID, @@ -840,7 +840,7 @@ module.exports.GetLastReport = async (req, res) => { } } ] - await attendance_repo.aggregate(GetLastReport) + await attendance_repo.aggregate(reportagg) .then(lastReport => { console.log(lastReport)