From c210cdc221db85f6711af92442808e15fc2eb10e Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Thu, 20 Jul 2023 16:41:30 +0700 Subject: voucher get perhitungan dari api --- src/lib/checkout/api/getVoucher.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/checkout/api/getVoucher.js') diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js index 03ac3d6d..57d8acf5 100644 --- a/src/lib/checkout/api/getVoucher.js +++ b/src/lib/checkout/api/getVoucher.js @@ -1,11 +1,11 @@ import odooApi from '@/core/api/odooApi' -export const getVoucher = async () => { - const dataVoucher = await odooApi('GET', `/api/v1/voucher`) +export const getVoucher = async (id) => { + const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`) return dataVoucher } -export const findVoucher = async (code) => { - const dataVoucher = await odooApi('GET', `/api/v1/voucher?code=${code}`) +export const findVoucher = async (code, id) => { + const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`) return dataVoucher } -- cgit v1.2.3