From 54dacd110fdbd0f40961c884ec02b1a37189b218 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Fri, 24 Oct 2025 12:15:25 +0700 Subject: try show voucher prod detail --- src-migrate/services/product.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src-migrate/services/product.ts') 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; -- cgit v1.2.3