Built motion from commit 2b9af5da.|2.6.26
[motion2.git] / server / api / userProfileSection / userProfileSection.rpc.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x03ec=['lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','client','http','request','info','UserProfileSection,\x20%s,\x20%s','UserProfileSection,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch'];(function(_0x55d42f,_0x3f15d7){var _0x4a42f4=function(_0x873c62){while(--_0x873c62){_0x55d42f['push'](_0x55d42f['shift']());}};_0x4a42f4(++_0x3f15d7);}(_0x03ec,0x85));var _0xc03e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x03ec[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xc03e('0x0'));var util=require(_0xc03e('0x1'));var moment=require('moment');var BPromise=require(_0xc03e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc03e('0x3'));var db=require(_0xc03e('0x4'))['db'];var utils=require(_0xc03e('0x5'));var logger=require('../../config/logger')(_0xc03e('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc03e('0x7')][_0xc03e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5b84f5,_0x1a1dd4,_0x4a61a8){return new BPromise(function(_0x66ee96,_0xbea888){return client[_0xc03e('0x9')](_0x5b84f5,_0x4a61a8)['then'](function(_0x231c51){logger[_0xc03e('0xa')](_0xc03e('0xb'),_0x1a1dd4,'request\x20sent');logger['debug'](_0xc03e('0xc'),_0x1a1dd4,_0xc03e('0xd'),JSON['stringify'](_0x231c51));if(_0x231c51['error']){if(_0x231c51[_0xc03e('0xe')][_0xc03e('0xf')]===0x1f4){logger[_0xc03e('0xe')](_0xc03e('0xb'),_0x1a1dd4,_0x231c51[_0xc03e('0xe')][_0xc03e('0x10')]);return _0xbea888(_0x231c51[_0xc03e('0xe')][_0xc03e('0x10')]);}logger[_0xc03e('0xe')](_0xc03e('0xb'),_0x1a1dd4,_0x231c51[_0xc03e('0xe')][_0xc03e('0x10')]);return _0x66ee96(_0x231c51[_0xc03e('0xe')][_0xc03e('0x10')]);}else{logger['info']('UserProfileSection,\x20%s,\x20%s',_0x1a1dd4,'request\x20sent');_0x66ee96(_0x231c51[_0xc03e('0x11')]['message']);}})[_0xc03e('0x12')](function(_0x308355){logger[_0xc03e('0xe')](_0xc03e('0xb'),_0x1a1dd4,_0x308355);_0xbea888(_0x308355);});});}