getproducto
This commit is contained in:
parent
5b4292e06f
commit
f0de070fff
|
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue