blob: 94de8721b8b87642b89af2d7eed54efe76a7aa2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import odooApi from '@/core/api/odooApi'
import { getAuth } from '@/core/utils/auth'
export const checkoutApi = async ({ data }) => {
const auth = getAuth()
const dataCheckout = await odooApi(
'POST',
`/api/v1/partner/${auth.partnerId}/sale_order/checkout`,
data
)
return dataCheckout
}
export const getProductsCheckout = async () => {
const id = getAuth()?.id
const products = await odooApi('GET',`/api/v1/user/${id}/sale_order/checkout`)
return products
}
|