summaryrefslogtreecommitdiff
path: root/src/lib/checkout/api/getVoucher.js
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-07-20 16:41:30 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-07-20 16:41:30 +0700
commitc210cdc221db85f6711af92442808e15fc2eb10e (patch)
tree78bc9f2a8b2f3e901d123d73f65555e9e25eabe7 /src/lib/checkout/api/getVoucher.js
parent91f5a1251c5eac261ac5a1997df581f5ccd8e868 (diff)
voucher get perhitungan dari api
Diffstat (limited to 'src/lib/checkout/api/getVoucher.js')
-rw-r--r--src/lib/checkout/api/getVoucher.js8
1 files changed, 4 insertions, 4 deletions
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
}