summaryrefslogtreecommitdiff
path: root/src-migrate/services
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-10-24 12:15:25 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-10-24 12:15:25 +0700
commit54dacd110fdbd0f40961c884ec02b1a37189b218 (patch)
treef4ef28a76b6e4c2a37a6eef53a3a10bb1145f9d5 /src-migrate/services
parentdd16b65c603420d3965edcb4ee5a4a8df0cfadfc (diff)
<MIqdad> try show voucher prod detail
Diffstat (limited to 'src-migrate/services')
-rw-r--r--src-migrate/services/product.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src-migrate/services/product.ts b/src-migrate/services/product.ts
index 77b645f0..9ab7814e 100644
--- a/src-migrate/services/product.ts
+++ b/src-migrate/services/product.ts
@@ -2,6 +2,7 @@ import { IProduct, IProductDetail } from '~/types/product';
import snakeCase from 'snakecase-keys';
import odooApi from '~/libs/odooApi';
import { ICategoryBreadcrumb } from '~/types/category';
+import { json } from 'stream/consumers';
const SELF_HOST = process.env.NEXT_PUBLIC_SELF_HOST;
@@ -13,6 +14,10 @@ export const getProductById = async (
const params = new URLSearchParams({ id, auth: tier });
return await fetch(`${url}?${params.toString()}`)
.then((res) => res.json())
+ // .then((json) => {
+ // console.log('[Prod detail]: ', json);
+ // return json;
+ // })
.then((res) => {
if (res.length > 0) return snakeCase(res[0]) as IProductDetail;
return null;