import request from 'umi-request';
import { TableListItem } from './data.d';

export async function queryRule(params?: object) {
  return request('/api/users/users-list', {
    method: 'POST',
    data: params,
  });
}

export async function addRule(params: TableListItem) {
  return request('/api/users/save-users', {
    method: 'POST',
    data: params,
  });
}

export async function updateRule(params: TableListItem) {
  return request('/api/users/save-users', {
    method: 'POST',
    data: params,
  });
}

export async function removeRule(params: TableListItem) {
  return request('/api/users/del-users', {
    method: 'POST',
    data: params,
  });
}