import request from '@/utils/request';

/**
 * 获取后台权限列表
 * @param {object} params
 * @returns {array} data
 */
export const getPermission = (params) => {
  return request.request({
    url: '/permission/get',
    method: 'get',
    params,
  });
};

/**
 * 更新后台权限列表
 * @param {object} params
 * @returns {array} data
 */
export const upsertPermission = (data) => {
  return request.request({
    url: '/permission/upsert',
    method: 'post',
    data,
  });
};
