Built motion from commit (unavailable).|2.6.0
[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 _0x0e34=['../../config/environment','jayson/promise','client','http','request','then','info','UserProfileSection,\x20%s,\x20%s','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x3f9e31,_0x11c81c){var _0x2dcd38=function(_0x306439){while(--_0x306439){_0x3f9e31['push'](_0x3f9e31['shift']());}};_0x2dcd38(++_0x11c81c);}(_0x0e34,0x13d));var _0x40e3=function(_0x530b5f,_0x5e1725){_0x530b5f=_0x530b5f-0x0;var _0x5909b0=_0x0e34[_0x530b5f];return _0x5909b0;};'use strict';var _=require(_0x40e3('0x0'));var util=require('util');var moment=require(_0x40e3('0x1'));var BPromise=require(_0x40e3('0x2'));var rs=require(_0x40e3('0x3'));var fs=require('fs');var Redis=require(_0x40e3('0x4'));var db=require(_0x40e3('0x5'))['db'];var utils=require(_0x40e3('0x6'));var logger=require('../../config/logger')(_0x40e3('0x7'));var config=require(_0x40e3('0x8'));var jayson=require(_0x40e3('0x9'));var client=jayson[_0x40e3('0xa')][_0x40e3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5bfb06,_0x11b2b1,_0x4c3a56){return new BPromise(function(_0x43ac79,_0x252dbb){return client[_0x40e3('0xc')](_0x5bfb06,_0x4c3a56)[_0x40e3('0xd')](function(_0x5cb12f){logger[_0x40e3('0xe')](_0x40e3('0xf'),_0x11b2b1,'request\x20sent');logger[_0x40e3('0x10')](_0x40e3('0x11'),_0x11b2b1,_0x40e3('0x12'),JSON[_0x40e3('0x13')](_0x5cb12f));if(_0x5cb12f[_0x40e3('0x14')]){if(_0x5cb12f[_0x40e3('0x14')][_0x40e3('0x15')]===0x1f4){logger[_0x40e3('0x14')]('UserProfileSection,\x20%s,\x20%s',_0x11b2b1,_0x5cb12f['error']['message']);return _0x252dbb(_0x5cb12f[_0x40e3('0x14')][_0x40e3('0x16')]);}logger['error'](_0x40e3('0xf'),_0x11b2b1,_0x5cb12f[_0x40e3('0x14')]['message']);return _0x43ac79(_0x5cb12f[_0x40e3('0x14')][_0x40e3('0x16')]);}else{logger[_0x40e3('0xe')](_0x40e3('0xf'),_0x11b2b1,_0x40e3('0x12'));_0x43ac79(_0x5cb12f[_0x40e3('0x17')][_0x40e3('0x16')]);}})[_0x40e3('0x18')](function(_0x17226e){logger['error'](_0x40e3('0xf'),_0x11b2b1,_0x17226e);_0x252dbb(_0x17226e);});});}