From 3e8e12f9136d7a87f3fe6f6f09958548d8a0c3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaume=20Sol=C3=ADs?= Date: Tue, 16 Apr 2024 19:37:37 +0200 Subject: [PATCH] devolver el producto --- api/controller/Product/product.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/controller/Product/product.controller.js b/api/controller/Product/product.controller.js index fa87a83..cecbec6 100644 --- a/api/controller/Product/product.controller.js +++ b/api/controller/Product/product.controller.js @@ -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