From e46299cf37a9b72e3bc46925263ccae4ee64caa7 Mon Sep 17 00:00:00 2001 From: patrickjieraldjuan Date: Sun, 28 Jan 2024 19:51:35 +0800 Subject: [PATCH] fixed code for getProduct controller model targeted Course instead of Product --- controllers/productControllers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/productControllers.js b/controllers/productControllers.js index e311e6b..6895416 100644 --- a/controllers/productControllers.js +++ b/controllers/productControllers.js @@ -379,7 +379,7 @@ exports.getCartDetails = async (req, res) => { module.exports.getProduct = (request, response) => { let reqParams = request.params.productId; - Course.findById(reqParams).then(result => response.send(result)) + Product.findById(reqParams).then(result => response.send(result)) .catch(error => response.send(error)); }