devolver el producto

This commit is contained in:
Jaume Solís 2024-04-16 19:37:37 +02:00
parent f0de070fff
commit 3e8e12f913
1 changed files with 1 additions and 1 deletions

View File

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