From dc334fa49ad13959b6a0d572fd56a4cde38176fa Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Tue, 11 Jul 2023 15:29:03 +0700 Subject: get voucher --- src/lib/checkout/api/getVoucher.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/lib/checkout/api') 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 +} -- cgit v1.2.3