Built motion from commit (unavailable).|2.5.16
[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 _0xe5f8=['UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x240d28,_0x285ca5){var _0xa097e6=function(_0x38cdbe){while(--_0x38cdbe){_0x240d28['push'](_0x240d28['shift']());}};_0xa097e6(++_0x285ca5);}(_0xe5f8,0x1a9));var _0x8e5f=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xe5f8[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x8e5f('0x0'));var util=require('util');var moment=require(_0x8e5f('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8e5f('0x2'));var db=require(_0x8e5f('0x3'))['db'];var utils=require(_0x8e5f('0x4'));var logger=require(_0x8e5f('0x5'))(_0x8e5f('0x6'));var config=require(_0x8e5f('0x7'));var jayson=require(_0x8e5f('0x8'));var client=jayson['client'][_0x8e5f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2bd9d,_0x3ca427,_0xbe7821){return new BPromise(function(_0x1b89e3,_0x3326ce){return client[_0x8e5f('0xa')](_0x2bd9d,_0xbe7821)['then'](function(_0xae3415){logger[_0x8e5f('0xb')](_0x8e5f('0xc'),_0x3ca427,_0x8e5f('0xd'));logger[_0x8e5f('0xe')](_0x8e5f('0xf'),_0x3ca427,_0x8e5f('0xd'),JSON[_0x8e5f('0x10')](_0xae3415));if(_0xae3415[_0x8e5f('0x11')]){if(_0xae3415[_0x8e5f('0x11')][_0x8e5f('0x12')]===0x1f4){logger['error'](_0x8e5f('0xc'),_0x3ca427,_0xae3415[_0x8e5f('0x11')][_0x8e5f('0x13')]);return _0x3326ce(_0xae3415[_0x8e5f('0x11')][_0x8e5f('0x13')]);}logger[_0x8e5f('0x11')](_0x8e5f('0xc'),_0x3ca427,_0xae3415['error'][_0x8e5f('0x13')]);return _0x1b89e3(_0xae3415[_0x8e5f('0x11')]['message']);}else{logger[_0x8e5f('0xb')]('UserProfileSection,\x20%s,\x20%s',_0x3ca427,_0x8e5f('0xd'));_0x1b89e3(_0xae3415[_0x8e5f('0x14')][_0x8e5f('0x13')]);}})[_0x8e5f('0x15')](function(_0x2ada41){logger[_0x8e5f('0x11')](_0x8e5f('0xc'),_0x3ca427,_0x2ada41);_0x3326ce(_0x2ada41);});});}