import request from '@/utils/request';

export function index (params) {
  return request({
    url: "/api/backend/user",
    method: "get",
    params
  })
}

export function save (data) {
  return request({
    url: "/api/backend/user/save",
    method: "post",
    data
  })
}

export function destroy (data) {
  return request({
    url: "/api/backend/user/delete",
    method: "post",
    data
  })
}

export function getRoles (params) {
  return request({
    url: "/api/backend/user/get-roles",
    method: "get",
    params
  })
}

export function setRoles (data) {
  return request({
    url: "/api/backend/user/set-roles",
    method: "post",
    data
  })
}
