Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / intFreshsalesField / intFreshsalesField.rpc.js
index 25773f2..3cf81ea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf621=['lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','client','http','request','then','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','code','FreshsalesField,\x20%s,\x20%s','message','info','result'];(function(_0x16b9ed,_0x56517a){var _0x66b1f8=function(_0x1c883){while(--_0x1c883){_0x16b9ed['push'](_0x16b9ed['shift']());}};_0x66b1f8(++_0x56517a);}(_0xf621,0x1b8));var _0x1f62=function(_0x20714a,_0x7de591){_0x20714a=_0x20714a-0x0;var _0x15e877=_0xf621[_0x20714a];return _0x15e877;};'use strict';var _=require(_0x1f62('0x0'));var util=require(_0x1f62('0x1'));var moment=require(_0x1f62('0x2'));var BPromise=require('bluebird');var rs=require(_0x1f62('0x3'));var fs=require('fs');var Redis=require(_0x1f62('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x1f62('0x5'));var logger=require(_0x1f62('0x6'))(_0x1f62('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x1f62('0x8')][_0x1f62('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x23356b,_0x45233f,_0x2c16de){return new BPromise(function(_0x3d4deb,_0x445966){return client[_0x1f62('0xa')](_0x23356b,_0x2c16de)[_0x1f62('0xb')](function(_0x249f48){logger['info']('FreshsalesField,\x20%s,\x20%s',_0x45233f,_0x1f62('0xc'));logger[_0x1f62('0xd')](_0x1f62('0xe'),_0x45233f,_0x1f62('0xc'),JSON[_0x1f62('0xf')](_0x249f48));if(_0x249f48[_0x1f62('0x10')]){if(_0x249f48[_0x1f62('0x10')][_0x1f62('0x11')]===0x1f4){logger[_0x1f62('0x10')](_0x1f62('0x12'),_0x45233f,_0x249f48[_0x1f62('0x10')]['message']);return _0x445966(_0x249f48[_0x1f62('0x10')][_0x1f62('0x13')]);}logger['error'](_0x1f62('0x12'),_0x45233f,_0x249f48['error'][_0x1f62('0x13')]);return _0x3d4deb(_0x249f48[_0x1f62('0x10')][_0x1f62('0x13')]);}else{logger[_0x1f62('0x14')]('FreshsalesField,\x20%s,\x20%s',_0x45233f,_0x1f62('0xc'));_0x3d4deb(_0x249f48[_0x1f62('0x15')][_0x1f62('0x13')]);}})['catch'](function(_0xf63214){logger[_0x1f62('0x10')](_0x1f62('0x12'),_0x45233f,_0xf63214);_0x445966(_0xf63214);});});}
\ No newline at end of file
+var _0xfb9f=['client','http','request','then','info','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','FreshsalesField,\x20%s,\x20%s','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x45321f,_0x1ba57b){var _0x3c431c=function(_0x3df10c){while(--_0x3df10c){_0x45321f['push'](_0x45321f['shift']());}};_0x3c431c(++_0x1ba57b);}(_0xfb9f,0x187));var _0xffb9=function(_0x32720c,_0x582d6b){_0x32720c=_0x32720c-0x0;var _0x2ded6b=_0xfb9f[_0x32720c];return _0x2ded6b;};'use strict';var _=require('lodash');var util=require(_0xffb9('0x0'));var moment=require(_0xffb9('0x1'));var BPromise=require(_0xffb9('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xffb9('0x3'))['db'];var utils=require(_0xffb9('0x4'));var logger=require(_0xffb9('0x5'))('rpc');var config=require(_0xffb9('0x6'));var jayson=require(_0xffb9('0x7'));var client=jayson[_0xffb9('0x8')][_0xffb9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5d6de6,_0x4f1743,_0x277636){return new BPromise(function(_0x2092a2,_0xd032f){return client[_0xffb9('0xa')](_0x5d6de6,_0x277636)[_0xffb9('0xb')](function(_0x21e952){logger[_0xffb9('0xc')]('FreshsalesField,\x20%s,\x20%s',_0x4f1743,_0xffb9('0xd'));logger[_0xffb9('0xe')](_0xffb9('0xf'),_0x4f1743,_0xffb9('0xd'),JSON[_0xffb9('0x10')](_0x21e952));if(_0x21e952[_0xffb9('0x11')]){if(_0x21e952[_0xffb9('0x11')][_0xffb9('0x12')]===0x1f4){logger['error']('FreshsalesField,\x20%s,\x20%s',_0x4f1743,_0x21e952[_0xffb9('0x11')][_0xffb9('0x13')]);return _0xd032f(_0x21e952[_0xffb9('0x11')][_0xffb9('0x13')]);}logger['error'](_0xffb9('0x14'),_0x4f1743,_0x21e952[_0xffb9('0x11')][_0xffb9('0x13')]);return _0x2092a2(_0x21e952[_0xffb9('0x11')][_0xffb9('0x13')]);}else{logger['info']('FreshsalesField,\x20%s,\x20%s',_0x4f1743,_0xffb9('0xd'));_0x2092a2(_0x21e952['result'][_0xffb9('0x13')]);}})['catch'](function(_0x364331){logger[_0xffb9('0x11')]('FreshsalesField,\x20%s,\x20%s',_0x4f1743,_0x364331);_0xd032f(_0x364331);});});}
\ No newline at end of file