diff options
Diffstat (limited to 'src/pages/api')
| -rw-r--r-- | src/pages/api/shop/midtrans-payment.js | 4 | ||||
| -rw-r--r-- | src/pages/api/shop/spell.js | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/pages/api/shop/midtrans-payment.js b/src/pages/api/shop/midtrans-payment.js index f7f29c7c..12aaa51f 100644 --- a/src/pages/api/shop/midtrans-payment.js +++ b/src/pages/api/shop/midtrans-payment.js @@ -22,7 +22,7 @@ export default async function handler(req, res) { {}, { Token: auth.token } ) - + if (!transaction?.id) { return res.status(400).json({ error: 'No Data' }) } @@ -57,7 +57,7 @@ export default async function handler(req, res) { customer_details: { first_name: transaction.address.customer.name, email: transaction.address.customer.email || '', - phone: transaction.address.customer.phone || '', + phone: transaction.address.customer.phone || '' } } diff --git a/src/pages/api/shop/spell.js b/src/pages/api/shop/spell.js index 634adb50..4c01765c 100644 --- a/src/pages/api/shop/spell.js +++ b/src/pages/api/shop/spell.js @@ -4,10 +4,9 @@ export default async function handler(req, res) { const { q = '' } = req.query let result = await axios( - process.env.SOLR_HOST + - `/solr/product/spell?indent=true&q.op=AND&q=${q}` + process.env.SOLR_HOST + `/solr/product/spell?indent=true&q.op=AND&q=${q}` ) - + try { res.status(200).json(result.data) } catch (error) { |
