diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-02 09:35:16 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-02 09:35:16 +0700 |
| commit | 40ae7e966913e085abb6644e5be56ee6bd6855fc (patch) | |
| tree | 9abd22773a17d1998e28e0ca0dff1ef128f0b627 /src/lib/checkout/api/getVoucher.js | |
| parent | 2376bb4ab8f791ce6b99e70478f792b525d4d5fe (diff) | |
| parent | 12c7841770052aefceda899db52b3e6b6d0b5e92 (diff) | |
<iman> Merge branch 'release' into Feature/all-promotion
Diffstat (limited to 'src/lib/checkout/api/getVoucher.js')
| -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 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 |
