Built motion from commit (unavailable).|2.4.19
[motion2.git] / server / api / userProfileResource / userProfileResource.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 _0x0ea1=['http','then','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x1db900,_0x2bf2fe){var _0x3e9b7f=function(_0x49da7f){while(--_0x49da7f){_0x1db900['push'](_0x1db900['shift']());}};_0x3e9b7f(++_0x2bf2fe);}(_0x0ea1,0xe4));var _0x10ea=function(_0x112e0e,_0x25f61a){_0x112e0e=_0x112e0e-0x0;var _0x35d007=_0x0ea1[_0x112e0e];return _0x35d007;};'use strict';var _=require(_0x10ea('0x0'));var util=require(_0x10ea('0x1'));var moment=require(_0x10ea('0x2'));var BPromise=require(_0x10ea('0x3'));var rs=require(_0x10ea('0x4'));var fs=require('fs');var Redis=require(_0x10ea('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x10ea('0x6'));var logger=require(_0x10ea('0x7'))(_0x10ea('0x8'));var config=require(_0x10ea('0x9'));var jayson=require(_0x10ea('0xa'));var client=jayson[_0x10ea('0xb')][_0x10ea('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1f9113,_0x3924e9,_0x553c01){return new BPromise(function(_0x5e2627,_0x378f1e){return client['request'](_0x1f9113,_0x553c01)[_0x10ea('0xd')](function(_0x62c7af){logger[_0x10ea('0xe')](_0x10ea('0xf'),_0x3924e9,_0x10ea('0x10'));logger[_0x10ea('0x11')](_0x10ea('0x12'),_0x3924e9,_0x10ea('0x10'),JSON[_0x10ea('0x13')](_0x62c7af));if(_0x62c7af[_0x10ea('0x14')]){if(_0x62c7af[_0x10ea('0x14')][_0x10ea('0x15')]===0x1f4){logger[_0x10ea('0x14')](_0x10ea('0xf'),_0x3924e9,_0x62c7af[_0x10ea('0x14')]['message']);return _0x378f1e(_0x62c7af['error'][_0x10ea('0x16')]);}logger[_0x10ea('0x14')](_0x10ea('0xf'),_0x3924e9,_0x62c7af[_0x10ea('0x14')][_0x10ea('0x16')]);return _0x5e2627(_0x62c7af[_0x10ea('0x14')]['message']);}else{logger[_0x10ea('0xe')](_0x10ea('0xf'),_0x3924e9,_0x10ea('0x10'));_0x5e2627(_0x62c7af['result'][_0x10ea('0x16')]);}})[_0x10ea('0x17')](function(_0x4ce687){logger[_0x10ea('0x14')]('UserProfileResource,\x20%s,\x20%s',_0x3924e9,_0x4ce687);_0x378f1e(_0x4ce687);});});}