From 0433d92034937c76135ceb83ef88402464006866 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Mon, 22 Jul 2024 15:08:07 +0700 Subject: get new voucher --- src/lib/checkout/api/getVoucher.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib/checkout/api') diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js index 07cf376e..15c6abbb 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, source) => { let dataVoucher = null @@ -19,3 +20,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 -- cgit v1.2.3