import odooApi from '@/core/api/odooApi' export const getVoucher = async (id, source) => { let dataVoucher = null if(source){ dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?source=${source}`) }else { dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`) } return dataVoucher } export const findVoucher = async (code, id, source) => { let dataVoucher = null if(source){ dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}&source=${source}`) }else{ dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`) } return dataVoucher }