'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.findMenusByRoleCode = exports.findButtonsByRoleCode = exports.relateButtonsToRole = exports.relateMenusToRole = exports.relateRolesAndUsers = exports.findAllRole = exports.deleteRole = exports.addRole = undefined;

var _reduxActions = require('redux-actions');

var _fetch = require('../system/fetch');

var _links = require('../constant/links');

var _links2 = _interopRequireDefault(_links);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var addRole = exports.addRole = function addRole(p) {
  return (0, _fetch.PFetch)(_links2.default.addRole, p);
}; /**
    * Created by cui on 16/11/16.
    */
var deleteRole = exports.deleteRole = function deleteRole(p) {
  return (0, _fetch.PFetch)(_links2.default.deleteRole, p);
};

var findAllRole = exports.findAllRole = function findAllRole(p) {
  return (0, _fetch.PFetch)(_links2.default.findAllRole, p);
};

var relateRolesAndUsers = exports.relateRolesAndUsers = function relateRolesAndUsers(p) {
  return (0, _fetch.PFetch)(_links2.default.relateRolesAndUsers, p);
};

var relateMenusToRole = exports.relateMenusToRole = function relateMenusToRole(p) {
  return (0, _fetch.PFetch)(_links2.default.relateMenusToRole, p);
};

var relateButtonsToRole = exports.relateButtonsToRole = function relateButtonsToRole(p) {
  return (0, _fetch.PFetch)(_links2.default.relateButtonsToRole, p);
};

var findButtonsByRoleCode = exports.findButtonsByRoleCode = function findButtonsByRoleCode(p) {
  return (0, _fetch.PFetch)(_links2.default.findButtonsByRoleCode, p);
};

var findMenusByRoleCode = exports.findMenusByRoleCode = function findMenusByRoleCode(p) {
  return (0, _fetch.PFetch)(_links2.default.findMenusByRoleCode, p);
};