Built motion from commit 0415ced0.|2.6.28
[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 _0x93ea=['error','message','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0x93ea,0x1b8));var _0xa93e=function(_0x4704dc,_0x575a5f){_0x4704dc=_0x4704dc-0x0;var _0x254d81=_0x93ea[_0x4704dc];return _0x254d81;};'use strict';var _=require(_0xa93e('0x0'));var util=require(_0xa93e('0x1'));var moment=require(_0xa93e('0x2'));var BPromise=require(_0xa93e('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa93e('0x4'));var db=require(_0xa93e('0x5'))['db'];var utils=require(_0xa93e('0x6'));var logger=require('../../config/logger')(_0xa93e('0x7'));var config=require(_0xa93e('0x8'));var jayson=require(_0xa93e('0x9'));var client=jayson[_0xa93e('0xa')][_0xa93e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3403a7,_0x1d3676,_0xea7365){return new BPromise(function(_0x598e44,_0x321b34){return client[_0xa93e('0xc')](_0x3403a7,_0xea7365)[_0xa93e('0xd')](function(_0x1c79ab){logger[_0xa93e('0xe')](_0xa93e('0xf'),_0x1d3676,_0xa93e('0x10'));logger[_0xa93e('0x11')](_0xa93e('0x12'),_0x1d3676,'request\x20sent',JSON[_0xa93e('0x13')](_0x1c79ab));if(_0x1c79ab[_0xa93e('0x14')]){if(_0x1c79ab[_0xa93e('0x14')]['code']===0x1f4){logger[_0xa93e('0x14')]('VtigerConfiguration,\x20%s,\x20%s',_0x1d3676,_0x1c79ab[_0xa93e('0x14')][_0xa93e('0x15')]);return _0x321b34(_0x1c79ab[_0xa93e('0x14')][_0xa93e('0x15')]);}logger[_0xa93e('0x14')]('VtigerConfiguration,\x20%s,\x20%s',_0x1d3676,_0x1c79ab[_0xa93e('0x14')][_0xa93e('0x15')]);return _0x598e44(_0x1c79ab[_0xa93e('0x14')][_0xa93e('0x15')]);}else{logger[_0xa93e('0xe')]('VtigerConfiguration,\x20%s,\x20%s',_0x1d3676,_0xa93e('0x10'));_0x598e44(_0x1c79ab['result'][_0xa93e('0x15')]);}})[_0xa93e('0x16')](function(_0x51f1c4){logger['error'](_0xa93e('0xf'),_0x1d3676,_0x51f1c4);_0x321b34(_0x51f1c4);});});}