summaryrefslogtreecommitdiff
path: root/src/lib/transaction/api/cancelTransactionApi.js
blob: 1bba2bdec1ac6a822f3df8a358dc4ff303744a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import odooApi from '@/core/api/odooApi'
import { getAuth } from '@/core/utils/auth'

const cancelTransactionApi = async ({ transaction }) => {
  const auth = getAuth()
  const dataCancelTransaction = await odooApi(
    'POST',
    `/api/v1/partner/${auth.partnerId}/sale_order/${transaction.id}/cancel`
  )
  return dataCancelTransaction
}

export default cancelTransactionApi