getproducto

This commit is contained in:
Jaume Solís 2024-04-16 19:16:53 +02:00
parent 5b4292e06f
commit f0de070fff
1 changed files with 2 additions and 2 deletions

View File

@ -98,10 +98,10 @@ class ProductController {
const { dateExpired, postalCode } = req.query
const id = Number(req.params.id)
const product = await db.getProductById(req.params.id);
//const filterProduct = _products[0].filter(item => item.itemFk === id)
const filterProduct = (product[0][0] && product[0][0][0])?product[0][0][0]:{};
return res.status(200).send({
data: product
data: filterProduct
})
}
}