Closed Tolgan closed 3 years ago
You should change route for top products; " api/product/top" gives error because of "/api/products/:id" , i dont know why you didnt get this error, maybe it can be helpful for someone follow through and having this error too.
you need to move /top above /:id the productRoutes.js here: https://github.com/bradtraversy/proshop_mern/blob/master/backend/routes/productRoutes.js#L16
You should change route for top products; " api/product/top" gives error because of "/api/products/:id" , i dont know why you didnt get this error, maybe it can be helpful for someone follow through and having this error too.