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