Built motion from commit 85328c08.|2.5.50
[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 _0x9ebf=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','lodash'];(function(_0x21af3a,_0x386e1d){var _0x268a49=function(_0x41a650){while(--_0x41a650){_0x21af3a['push'](_0x21af3a['shift']());}};_0x268a49(++_0x386e1d);}(_0x9ebf,0x18f));var _0xf9eb=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0x9ebf[_0x5d6456];return _0x4d66c1;};'use strict';var _=require(_0xf9eb('0x0'));var util=require(_0xf9eb('0x1'));var moment=require(_0xf9eb('0x2'));var BPromise=require(_0xf9eb('0x3'));var rs=require(_0xf9eb('0x4'));var fs=require('fs');var Redis=require(_0xf9eb('0x5'));var db=require(_0xf9eb('0x6'))['db'];var utils=require(_0xf9eb('0x7'));var logger=require('../../config/logger')(_0xf9eb('0x8'));var config=require(_0xf9eb('0x9'));var jayson=require(_0xf9eb('0xa'));var client=jayson[_0xf9eb('0xb')][_0xf9eb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2aa143,_0x2e99e9,_0x5473a9){return new BPromise(function(_0x4c98b1,_0x35470e){return client[_0xf9eb('0xd')](_0x2aa143,_0x5473a9)[_0xf9eb('0xe')](function(_0x2772be){logger['info'](_0xf9eb('0xf'),_0x2e99e9,_0xf9eb('0x10'));logger[_0xf9eb('0x11')](_0xf9eb('0x12'),_0x2e99e9,_0xf9eb('0x10'),JSON['stringify'](_0x2772be));if(_0x2772be[_0xf9eb('0x13')]){if(_0x2772be[_0xf9eb('0x13')][_0xf9eb('0x14')]===0x1f4){logger[_0xf9eb('0x13')]('UserProfileSection,\x20%s,\x20%s',_0x2e99e9,_0x2772be[_0xf9eb('0x13')][_0xf9eb('0x15')]);return _0x35470e(_0x2772be[_0xf9eb('0x13')][_0xf9eb('0x15')]);}logger['error'](_0xf9eb('0xf'),_0x2e99e9,_0x2772be[_0xf9eb('0x13')]['message']);return _0x4c98b1(_0x2772be[_0xf9eb('0x13')][_0xf9eb('0x15')]);}else{logger[_0xf9eb('0x16')]('UserProfileSection,\x20%s,\x20%s',_0x2e99e9,_0xf9eb('0x10'));_0x4c98b1(_0x2772be[_0xf9eb('0x17')][_0xf9eb('0x15')]);}})[_0xf9eb('0x18')](function(_0xc59310){logger[_0xf9eb('0x13')](_0xf9eb('0xf'),_0x2e99e9,_0xc59310);_0x35470e(_0xc59310);});});}