I am trying to fetch top rated 3 products


// @route   GET /api/products/top
// @desc    Get top rated products
// @access  Public
router.get(
  '/top',
  asyncHandler(async (req, res) => {
    const products = await Product.find({}).sort({ rating: -1 }).limit(3)

    res.json(products)
  })
)

enter image description here

Cast to ObjectId failed for value “top” (type string) at path “_id” for model “Product”

[enter image description here][1]