Built motion from commit (unavailable).|2.4.18
[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 _0xb36e=['request','then','info','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','error','code','UserProfileSection,\x20%s,\x20%s','message','result','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb36e,0x9e));var _0xeb36=function(_0x346178,_0x369c3b){_0x346178=_0x346178-0x0;var _0x39808f=_0xb36e[_0x346178];return _0x39808f;};'use strict';var _=require(_0xeb36('0x0'));var util=require('util');var moment=require(_0xeb36('0x1'));var BPromise=require(_0xeb36('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xeb36('0x3'));var db=require(_0xeb36('0x4'))['db'];var utils=require(_0xeb36('0x5'));var logger=require(_0xeb36('0x6'))(_0xeb36('0x7'));var config=require(_0xeb36('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xeb36('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2bf1d4,_0x45c53a,_0x595d7f){return new BPromise(function(_0x42aedf,_0x297a78){return client[_0xeb36('0xa')](_0x2bf1d4,_0x595d7f)[_0xeb36('0xb')](function(_0xaa4795){logger[_0xeb36('0xc')]('UserProfileSection,\x20%s,\x20%s',_0x45c53a,_0xeb36('0xd'));logger[_0xeb36('0xe')](_0xeb36('0xf'),_0x45c53a,_0xeb36('0xd'),JSON['stringify'](_0xaa4795));if(_0xaa4795[_0xeb36('0x10')]){if(_0xaa4795['error'][_0xeb36('0x11')]===0x1f4){logger[_0xeb36('0x10')](_0xeb36('0x12'),_0x45c53a,_0xaa4795[_0xeb36('0x10')][_0xeb36('0x13')]);return _0x297a78(_0xaa4795[_0xeb36('0x10')][_0xeb36('0x13')]);}logger['error']('UserProfileSection,\x20%s,\x20%s',_0x45c53a,_0xaa4795[_0xeb36('0x10')][_0xeb36('0x13')]);return _0x42aedf(_0xaa4795['error'][_0xeb36('0x13')]);}else{logger['info'](_0xeb36('0x12'),_0x45c53a,_0xeb36('0xd'));_0x42aedf(_0xaa4795[_0xeb36('0x14')][_0xeb36('0x13')]);}})['catch'](function(_0x5f5b1e){logger['error'](_0xeb36('0x12'),_0x45c53a,_0x5f5b1e);_0x297a78(_0x5f5b1e);});});}