Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / intVtigerConfiguration / intVtigerConfiguration.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 _0x404f=['../../config/environment','jayson/promise','http','request','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0xdc3fc6,_0x11bd84){var _0x3128c4=function(_0xea0e68){while(--_0xea0e68){_0xdc3fc6['push'](_0xdc3fc6['shift']());}};_0x3128c4(++_0x11bd84);}(_0x404f,0x12d));var _0xf404=function(_0x542318,_0x49ac00){_0x542318=_0x542318-0x0;var _0x1d3987=_0x404f[_0x542318];return _0x1d3987;};'use strict';var _=require(_0xf404('0x0'));var util=require(_0xf404('0x1'));var moment=require('moment');var BPromise=require(_0xf404('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf404('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xf404('0x4'));var logger=require(_0xf404('0x5'))(_0xf404('0x6'));var config=require(_0xf404('0x7'));var jayson=require(_0xf404('0x8'));var client=jayson['client'][_0xf404('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x339db0,_0xabc7d7,_0x37cc49){return new BPromise(function(_0xdf1fed,_0x57142f){return client[_0xf404('0xa')](_0x339db0,_0x37cc49)[_0xf404('0xb')](function(_0x13d043){logger[_0xf404('0xc')](_0xf404('0xd'),_0xabc7d7,_0xf404('0xe'));logger[_0xf404('0xf')](_0xf404('0x10'),_0xabc7d7,_0xf404('0xe'),JSON['stringify'](_0x13d043));if(_0x13d043[_0xf404('0x11')]){if(_0x13d043[_0xf404('0x11')][_0xf404('0x12')]===0x1f4){logger['error'](_0xf404('0xd'),_0xabc7d7,_0x13d043[_0xf404('0x11')][_0xf404('0x13')]);return _0x57142f(_0x13d043[_0xf404('0x11')][_0xf404('0x13')]);}logger[_0xf404('0x11')](_0xf404('0xd'),_0xabc7d7,_0x13d043[_0xf404('0x11')]['message']);return _0xdf1fed(_0x13d043['error'][_0xf404('0x13')]);}else{logger['info'](_0xf404('0xd'),_0xabc7d7,_0xf404('0xe'));_0xdf1fed(_0x13d043[_0xf404('0x14')][_0xf404('0x13')]);}})[_0xf404('0x15')](function(_0x408214){logger[_0xf404('0x11')]('VtigerConfiguration,\x20%s,\x20%s',_0xabc7d7,_0x408214);_0x57142f(_0x408214);});});}