Closed Asem-Assi closed 3 months ago
thanks man, i think there is a bug in addToCart controller in the check the availability of product it must be like this: const isProductAvailable = await addToCartModel.findOne({ productId, userId: currentUser });
insted of: const isProductAvailable = await addToCartModel.findOne({ productId});
yes bro, In next video i will solve this
Thank u brother for figure it out I will also take a look at this
thanks man, i think there is a bug in addToCart controller in the check the availability of product it must be like this: const isProductAvailable = await addToCartModel.findOne({ productId, userId: currentUser });
insted of: const isProductAvailable = await addToCartModel.findOne({ productId});