@ -375,3 +375,11 @@ exports.getCartDetails = async (req, res) => {
res.status(500).json({ message: 'Error fetching cart details' });
}
};
module.exports.getProduct = (request, response) => {
let reqParams = request.params.productId;
Course.findById(reqParams).then(result => response.send(result))
.catch(error => response.send(error));
@ -33,6 +33,8 @@ router.put(`/:productId/activate`, verify, verifyAdmin, productControllers.activ
// Route to create an order || check-out
router.post(`/create-order`, verify, verifyNonAdmin, productControllers.createOrder);
// Route for getting the information of specific product
router.get("/:productId", courseController.getProduct);
// My Cart