diff options
Diffstat (limited to 'src/lib/checkout/api/getVoucher.js')
| -rw-r--r-- | src/lib/checkout/api/getVoucher.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js index 03ac3d6d..57d8acf5 100644 --- a/src/lib/checkout/api/getVoucher.js +++ b/src/lib/checkout/api/getVoucher.js @@ -1,11 +1,11 @@ import odooApi from '@/core/api/odooApi' -export const getVoucher = async () => { - const dataVoucher = await odooApi('GET', `/api/v1/voucher`) +export const getVoucher = async (id) => { + const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`) return dataVoucher } -export const findVoucher = async (code) => { - const dataVoucher = await odooApi('GET', `/api/v1/voucher?code=${code}`) +export const findVoucher = async (code, id) => { + const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`) return dataVoucher } |
