A

router.post('/', (req, res, next) => {
const product = new Product({
_id: new mongoose.Types.ObjectId(),
name: req.body.name,
price: req.body.price,
dimensions: {
height: req.body.height,
width: req.body.width,
depth: req.body.depth,
weight: req.body.weight,
size: req.body.size,
},
details: {
assembly: req.body.assembly,
fabricComposition: req.body.fabricComposition,
foamType: req.body.foamType,
care: req.body.care,
},
})
product.save()