summaryrefslogtreecommitdiff
path: root/src/lib/checkout/api
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-07-14 01:24:27 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-07-14 01:24:27 +0000
commit782aa7d088c85f4cb837926a3f671495d0d1a0c1 (patch)
treedf524b359d3e935e7e26ea08ceec933f5480c4be /src/lib/checkout/api
parentd61b3ca0213395099e4cea9ace8172d4e622fb52 (diff)
parent3f890e6d482cefba37014e021cb4c2b8d5de2a9d (diff)
Merged in Feature/voucher (pull request #12)
Feature/voucher
Diffstat (limited to 'src/lib/checkout/api')
-rw-r--r--src/lib/checkout/api/getVoucher.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js
new file mode 100644
index 00000000..03ac3d6d
--- /dev/null
+++ b/src/lib/checkout/api/getVoucher.js
@@ -0,0 +1,11 @@
+import odooApi from '@/core/api/odooApi'
+
+export const getVoucher = async () => {
+ const dataVoucher = await odooApi('GET', `/api/v1/voucher`)
+ return dataVoucher
+}
+
+export const findVoucher = async (code) => {
+ const dataVoucher = await odooApi('GET', `/api/v1/voucher?code=${code}`)
+ return dataVoucher
+}