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 { dateExpired, postalCode } = req.query
|
||||||
const id = Number(req.params.id)
|
const id = Number(req.params.id)
|
||||||
const product = await db.getProductById(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({
|
return res.status(200).send({
|
||||||
data: filterProduct
|
data: filterProduct
|
||||||
|
|
|
@ -336,7 +336,7 @@ export default defineComponent({
|
||||||
<Container cardContainer class="no-padding">
|
<Container cardContainer class="no-padding">
|
||||||
<template
|
<template
|
||||||
v-for="(
|
v-for="(
|
||||||
{ image, discount, isNew, name, price, id }, i
|
{ image, discount, isNew, name, price, id, postalCode }, i
|
||||||
) in products.data"
|
) in products.data"
|
||||||
:key="id"
|
:key="id"
|
||||||
>
|
>
|
||||||
|
@ -348,6 +348,7 @@ export default defineComponent({
|
||||||
:imgSrc="image"
|
:imgSrc="image"
|
||||||
:isNew="isNew"
|
:isNew="isNew"
|
||||||
:id="id"
|
:id="id"
|
||||||
|
:hasPostalCode="(postalCode !== 'undefined')?true:false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
Loading…
Reference in New Issue