'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.updatPasswordServer = exports.relateRolesAndUsers = exports.findAllRolesByUserId = exports.searchAccountServer = exports.updateAccountServer = exports.findAccountById = exports.deleteAccountServer = exports.addAccountServer = undefined;

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

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

var _links2 = _interopRequireDefault(_links);

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

/* eslint-disable */
/**
 * Created by geweimin on 16/11/14.
 */
var addAccountServer = exports.addAccountServer = function addAccountServer(params) {
  return (0, _fetch.PFetch)(_links2.default.addAccount, params);
};

var deleteAccountServer = exports.deleteAccountServer = function deleteAccountServer(params) {
  return (0, _fetch.PFetch)(_links2.default.updateAccount, params);
};

var findAccountById = exports.findAccountById = function findAccountById(params) {
  return (0, _fetch.PFetch)(_links2.default.findAccountById, params).then(function (d) {
    return d;
  });
};

var updateAccountServer = exports.updateAccountServer = function updateAccountServer(params) {
  return (0, _fetch.PFetch)(_links2.default.updateAccount, params);
};

var searchAccountServer = exports.searchAccountServer = function searchAccountServer(params) {
  return (0, _fetch.PFetch)(_links2.default.searchAccount, params).then(function (d) {
    return d;
  });
};

var findAllRolesByUserId = exports.findAllRolesByUserId = function findAllRolesByUserId(params) {
  return (0, _fetch.PFetch)(_links2.default.findAllRolesByUserId, params).then(function (d) {
    return d;
  });
};

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

var updatPasswordServer = exports.updatPasswordServer = function updatPasswordServer(params) {
  return (0, _fetch.PFetch)(_links2.default.updatPassword, params);
};