diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2024-07-22 15:08:07 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2024-07-22 15:08:07 +0700 |
| commit | 0433d92034937c76135ceb83ef88402464006866 (patch) | |
| tree | 5afac17eac262edf6505c1be225abe8230bcedf9 /src/lib/checkout/api | |
| parent | d0f97021c611d07944f3cbc7e2610b1d495d897f (diff) | |
get new voucher
Diffstat (limited to 'src/lib/checkout/api')
| -rw-r--r-- | src/lib/checkout/api/getVoucher.js | 10 |
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 |
