Built motion from commit 9c91e9f5.|2.6.29
[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 _0x9fd4=['http','request','then','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client'];(function(_0x5eb356,_0x411506){var _0x26e348=function(_0x27d70e){while(--_0x27d70e){_0x5eb356['push'](_0x5eb356['shift']());}};_0x26e348(++_0x411506);}(_0x9fd4,0x16c));var _0x49fd=function(_0x388e6d,_0x4db588){_0x388e6d=_0x388e6d-0x0;var _0x33bf25=_0x9fd4[_0x388e6d];return _0x33bf25;};'use strict';var _=require(_0x49fd('0x0'));var util=require(_0x49fd('0x1'));var moment=require(_0x49fd('0x2'));var BPromise=require(_0x49fd('0x3'));var rs=require(_0x49fd('0x4'));var fs=require('fs');var Redis=require(_0x49fd('0x5'));var db=require(_0x49fd('0x6'))['db'];var utils=require(_0x49fd('0x7'));var logger=require(_0x49fd('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x49fd('0x9'));var client=jayson[_0x49fd('0xa')][_0x49fd('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x9353cd,_0x48b999,_0x14bb94){return new BPromise(function(_0x461ac1,_0x36f605){return client[_0x49fd('0xc')](_0x9353cd,_0x14bb94)[_0x49fd('0xd')](function(_0x4a1c47){logger[_0x49fd('0xe')](_0x49fd('0xf'),_0x48b999,_0x49fd('0x10'));logger[_0x49fd('0x11')](_0x49fd('0x12'),_0x48b999,_0x49fd('0x10'),JSON[_0x49fd('0x13')](_0x4a1c47));if(_0x4a1c47['error']){if(_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x15')]===0x1f4){logger[_0x49fd('0x14')](_0x49fd('0xf'),_0x48b999,_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);return _0x36f605(_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);}logger[_0x49fd('0x14')](_0x49fd('0xf'),_0x48b999,_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);return _0x461ac1(_0x4a1c47[_0x49fd('0x14')][_0x49fd('0x16')]);}else{logger[_0x49fd('0xe')](_0x49fd('0xf'),_0x48b999,_0x49fd('0x10'));_0x461ac1(_0x4a1c47[_0x49fd('0x17')][_0x49fd('0x16')]);}})[_0x49fd('0x18')](function(_0x14c34f){logger[_0x49fd('0x14')](_0x49fd('0xf'),_0x48b999,_0x14c34f);_0x36f605(_0x14c34f);});});}