From 7265295454801c1d921385a4b67fb3780b46771e Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 14:00:00 +0700 Subject: fix --- src/lib/checkout/api/checkoutApi.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/lib/checkout/api/checkoutApi.js (limited to 'src/lib/checkout/api/checkoutApi.js') diff --git a/src/lib/checkout/api/checkoutApi.js b/src/lib/checkout/api/checkoutApi.js new file mode 100644 index 00000000..b76c9b7f --- /dev/null +++ b/src/lib/checkout/api/checkoutApi.js @@ -0,0 +1,14 @@ +import odooApi from '@/core/api/odooApi' +import { getAuth } from '@/core/utils/auth' + +const checkoutApi = async ({ data }) => { + const auth = getAuth() + const dataCheckout = await odooApi( + 'POST', + `/api/v1/partner/${auth.partnerId}/sale_order/checkout`, + data + ) + return dataCheckout +} + +export default checkoutApi -- cgit v1.2.3