import axios from 'axios';
import { API_PREF } from './common';

const CancelOrder = ({ custom_id }) => {
  return axios
    .post(`/api/order/cancel-order`, { custom_id })
    .then(response => {
      return response['data']['state'];
    })
    .catch(error => {
      console.error(error);
    });
};

export default CancelOrder;
