diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-07-24 03:32:03 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-07-24 03:32:03 +0000 |
| commit | 4fcb73a336a6025a0ead194b317543efcd4f0e4b (patch) | |
| tree | 20ea651ea2c02be2bae2c2915ca5ab7ff2f95538 /src/lib/checkout/api/getVoucher.js | |
| parent | d61b3ca0213395099e4cea9ace8172d4e622fb52 (diff) | |
| parent | 984f1b13b408ee9652072392d6312d609b353315 (diff) | |
Merged in Feature/promotion_programvaoucher (pull request #15)
Feature/promotion programvaoucher
Diffstat (limited to 'src/lib/checkout/api/getVoucher.js')
| -rw-r--r-- | src/lib/checkout/api/getVoucher.js | 11 |
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..57d8acf5 --- /dev/null +++ b/src/lib/checkout/api/getVoucher.js @@ -0,0 +1,11 @@ +import odooApi from '@/core/api/odooApi' + +export const getVoucher = async (id) => { + const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`) + return dataVoucher +} + +export const findVoucher = async (code, id) => { + const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`) + return dataVoucher +} |
