summaryrefslogtreecommitdiff
path: root/src/lib/checkout/api
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-07-22 15:08:07 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-07-22 15:08:07 +0700
commit0433d92034937c76135ceb83ef88402464006866 (patch)
tree5afac17eac262edf6505c1be225abe8230bcedf9 /src/lib/checkout/api
parentd0f97021c611d07944f3cbc7e2610b1d495d897f (diff)
get new voucher
Diffstat (limited to 'src/lib/checkout/api')
-rw-r--r--src/lib/checkout/api/getVoucher.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js
index 07cf376e..15c6abbb 100644
--- a/src/lib/checkout/api/getVoucher.js
+++ b/src/lib/checkout/api/getVoucher.js
@@ -1,4 +1,5 @@
import odooApi from '@/core/api/odooApi'
+import { getAuth } from '@/core/utils/auth'
export const getVoucher = async (id, source) => {
let dataVoucher = null
@@ -19,3 +20,12 @@ export const findVoucher = async (code, id, source) => {
}
return dataVoucher
}
+
+
+export const getVoucherNew = async (source) => {
+ const id = getAuth()?.id;
+ const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?${source}`)
+
+ return dataVoucher
+
+} \ No newline at end of file