import { config, networkUtils } from '../../utils';

const { request } = networkUtils;
const { api } = config;
const { sys } = api;
const { instances } = sys;

export async function query(params) {
  return request({
    url: instances,
    method: 'get',
    data: params,
  });
}

export async function getSingle(id) {
  return request({
    url: `${instances}/${id}`,
    method: 'get',
  });
}

export async function remove(id) {
  return request({
    url: `${instances}/${id}`,
    method: 'post',
  });
}
