Built motion from commit (unavailable).|2.3.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 _0xbbfe=['stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','UserProfileSection,\x20%s,\x20%s,\x20%s'];(function(_0x2b8810,_0x55efdb){var _0x4c0f41=function(_0x3104cd){while(--_0x3104cd){_0x2b8810['push'](_0x2b8810['shift']());}};_0x4c0f41(++_0x55efdb);}(_0xbbfe,0x1e6));var _0xebbf=function(_0x56e583,_0x21253a){_0x56e583=_0x56e583-0x0;var _0x32361e=_0xbbfe[_0x56e583];return _0x32361e;};'use strict';var _=require('lodash');var util=require(_0xebbf('0x0'));var moment=require(_0xebbf('0x1'));var BPromise=require(_0xebbf('0x2'));var rs=require(_0xebbf('0x3'));var fs=require('fs');var Redis=require(_0xebbf('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xebbf('0x5'));var logger=require(_0xebbf('0x6'))('rpc');var config=require(_0xebbf('0x7'));var jayson=require(_0xebbf('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x149965,_0x5a9439,_0xbba365){return new BPromise(function(_0x27f341,_0x12ac91){return client[_0xebbf('0x9')](_0x149965,_0xbba365)['then'](function(_0x4491ef){logger[_0xebbf('0xa')](_0xebbf('0xb'),_0x5a9439,_0xebbf('0xc'));logger['debug'](_0xebbf('0xd'),_0x5a9439,_0xebbf('0xc'),JSON[_0xebbf('0xe')](_0x4491ef));if(_0x4491ef[_0xebbf('0xf')]){if(_0x4491ef['error'][_0xebbf('0x10')]===0x1f4){logger[_0xebbf('0xf')](_0xebbf('0xb'),_0x5a9439,_0x4491ef[_0xebbf('0xf')][_0xebbf('0x11')]);return _0x12ac91(_0x4491ef['error'][_0xebbf('0x11')]);}logger[_0xebbf('0xf')](_0xebbf('0xb'),_0x5a9439,_0x4491ef[_0xebbf('0xf')][_0xebbf('0x11')]);return _0x27f341(_0x4491ef[_0xebbf('0xf')][_0xebbf('0x11')]);}else{logger[_0xebbf('0xa')](_0xebbf('0xb'),_0x5a9439,_0xebbf('0xc'));_0x27f341(_0x4491ef[_0xebbf('0x12')][_0xebbf('0x11')]);}})[_0xebbf('0x13')](function(_0x493581){logger[_0xebbf('0xf')](_0xebbf('0xb'),_0x5a9439,_0x493581);_0x12ac91(_0x493581);});});}