summaryrefslogtreecommitdiff
path: root/src/lib/checkout/api/checkoutApi.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/checkout/api/checkoutApi.js')
-rw-r--r--src/lib/checkout/api/checkoutApi.js14
1 files changed, 14 insertions, 0 deletions
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