Compare commits
2 Commits
f0de070fff
...
9b3688f8fc
Author | SHA1 | Date |
---|---|---|
Jaume Solís | 9b3688f8fc | |
Jaume Solís | 3e8e12f913 |
|
@ -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
|
||||
|
|
|
@ -336,7 +336,7 @@ export default defineComponent({
|
|||
<Container cardContainer class="no-padding">
|
||||
<template
|
||||
v-for="(
|
||||
{ image, discount, isNew, name, price, id }, i
|
||||
{ image, discount, isNew, name, price, id, postalCode }, i
|
||||
) in products.data"
|
||||
:key="id"
|
||||
>
|
||||
|
@ -348,6 +348,7 @@ export default defineComponent({
|
|||
:imgSrc="image"
|
||||
:isNew="isNew"
|
||||
:id="id"
|
||||
:hasPostalCode="(postalCode !== 'undefined')?true:false"
|
||||
/>
|
||||
</template>
|
||||
</Container>
|
||||
|
|
Loading…
Reference in New Issue