summaryrefslogtreecommitdiff
path: root/src/lib/checkout/api
diff options
context:
space:
mode:
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 54c8cce5..779cef43 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, query) => {
const queryParam = new URLSearchParams(query);
@@ -22,3 +23,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