const handlePost = (request, data) => (request({
  url: '',
  method: 'post',
  data
}))

export default ({ service, request, serviceForMock, requestForMock, mock, faker, tools }) => ({
  /**
   * @description 方法名称
   * @param {Object} data 请求携带的信息
   */

  ADD_NODE: (data) => handlePost(request, data),
  UPDATE_NODE: (data) => handlePost(request, data),
  REMOVE_NODE: (data) => handlePost(request, data),

  QUERY_NODE () {
    return request({ url: '?query=nodes' })
  }
})
