From d9ffc1e045a75629d9debfac12b8be340b57c70c Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Wed, 19 Mar 2025 16:58:23 +0700 Subject: api webhook biteshi[ --- src/pages/api/webhook/biteship.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/pages/api/webhook/biteship.js (limited to 'src/pages/api') diff --git a/src/pages/api/webhook/biteship.js b/src/pages/api/webhook/biteship.js new file mode 100644 index 00000000..f1100d2d --- /dev/null +++ b/src/pages/api/webhook/biteship.js @@ -0,0 +1,13 @@ +import odooApi from '@/core/api/odooApi'; + + +export default async function handler(req, res) { + const body = req.body + + if(req.body){ + let result = odooApi('POST', '/api/v1/webhook/biteship', body) + } + + res.status(200).send("ok"); + +} \ No newline at end of file -- cgit v1.2.3 From f13517139cd9f69488ae44582d90990eab472aa4 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Tue, 29 Apr 2025 11:27:29 +0700 Subject: bug fixing flash sale header --- src/pages/api/flashsale-header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pages/api') diff --git a/src/pages/api/flashsale-header.js b/src/pages/api/flashsale-header.js index 578801ae..916a9cd2 100644 --- a/src/pages/api/flashsale-header.js +++ b/src/pages/api/flashsale-header.js @@ -35,7 +35,7 @@ export default async function handler(req, res) { } return res.status(200).json({ data }); } else { - const flashSale = await odooApi('GET', `/api/v1/flashsale/header`); + const flashSale = await odooApi('GET', `/api/v1/flashsale/header?is_show_program=true`); if (flashSale.length === 0) { return res.status(200).json({ data: [] }); } else { -- cgit v1.2.3 From 480e89a0d2ccd274b956b4c4fb7ff520765c6606 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 29 Apr 2025 14:53:53 +0700 Subject: fix bug flashsale --- src/pages/api/shop/search.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pages/api') diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js index 63ec7ca0..a1eecc52 100644 --- a/src/pages/api/shop/search.js +++ b/src/pages/api/shop/search.js @@ -19,6 +19,7 @@ export default async function handler(req, res) { source = '', } = req.query; + let { stock = '' } = req.query; let paramOrderBy = ''; switch (orderBy) { -- cgit v1.2.3 From 77e49bf7f69a0712da632ddec5b9bd0926389955 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 26 May 2025 14:23:40 +0700 Subject: filter based on stock quantity for ready stock page --- src/pages/api/shop/search.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pages/api') diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js index a1eecc52..8ab5c87c 100644 --- a/src/pages/api/shop/search.js +++ b/src/pages/api/shop/search.js @@ -89,6 +89,10 @@ export default async function handler(req, res) { 'price_tier1_v2_f:[1 TO *]', ]; + if (orderBy === 'stock') { + filterQueries.push('stock_total_f:{0 TO *}'); // Hanya produk dengan stock > 0 + } + if (fq && source != 'similar' && typeof fq != 'string') { // filterQueries.push(fq); fq.push(...filterQueries); -- cgit v1.2.3 From 96ba337041e6b157abc8e6f7def1525e340be21a Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 26 May 2025 15:12:21 +0700 Subject: push ulang --- src/pages/api/shop/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pages/api') diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js index 8ab5c87c..e14b0ca2 100644 --- a/src/pages/api/shop/search.js +++ b/src/pages/api/shop/search.js @@ -90,7 +90,7 @@ export default async function handler(req, res) { ]; if (orderBy === 'stock') { - filterQueries.push('stock_total_f:{0 TO *}'); // Hanya produk dengan stock > 0 + filterQueries.push('stock_total_f:{0 TO *}'); } if (fq && source != 'similar' && typeof fq != 'string') { -- cgit v1.2.3