Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / api / intFreshsalesField / intFreshsalesField.rpc.js
index 7098db8..28027f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9f0=['jayson/promise','client','http','FreshsalesField,\x20%s,\x20%s','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x49028d,_0x2a55dd){var _0xc4439c=function(_0x51c3f1){while(--_0x51c3f1){_0x49028d['push'](_0x49028d['shift']());}};_0xc4439c(++_0x2a55dd);}(_0xb9f0,0x181));var _0x0b9f=function(_0xd98945,_0x45293b){_0xd98945=_0xd98945-0x0;var _0x5e7043=_0xb9f0[_0xd98945];return _0x5e7043;};'use strict';var _=require('lodash');var util=require(_0x0b9f('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0b9f('0x1'));var db=require(_0x0b9f('0x2'))['db'];var utils=require(_0x0b9f('0x3'));var logger=require(_0x0b9f('0x4'))(_0x0b9f('0x5'));var config=require('../../config/environment');var jayson=require(_0x0b9f('0x6'));var client=jayson[_0x0b9f('0x7')][_0x0b9f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x48d6c8,_0x369f79,_0x1729bb){return new BPromise(function(_0x4440e1,_0xf56540){return client['request'](_0x48d6c8,_0x1729bb)['then'](function(_0x4fda66){logger['info'](_0x0b9f('0x9'),_0x369f79,'request\x20sent');logger['debug'](_0x0b9f('0xa'),_0x369f79,'request\x20sent',JSON[_0x0b9f('0xb')](_0x4fda66));if(_0x4fda66[_0x0b9f('0xc')]){if(_0x4fda66['error'][_0x0b9f('0xd')]===0x1f4){logger[_0x0b9f('0xc')]('FreshsalesField,\x20%s,\x20%s',_0x369f79,_0x4fda66[_0x0b9f('0xc')][_0x0b9f('0xe')]);return _0xf56540(_0x4fda66[_0x0b9f('0xc')][_0x0b9f('0xe')]);}logger[_0x0b9f('0xc')](_0x0b9f('0x9'),_0x369f79,_0x4fda66[_0x0b9f('0xc')][_0x0b9f('0xe')]);return _0x4440e1(_0x4fda66[_0x0b9f('0xc')][_0x0b9f('0xe')]);}else{logger['info'](_0x0b9f('0x9'),_0x369f79,_0x0b9f('0xf'));_0x4440e1(_0x4fda66[_0x0b9f('0x10')][_0x0b9f('0xe')]);}})['catch'](function(_0x5bc40a){logger[_0x0b9f('0xc')](_0x0b9f('0x9'),_0x369f79,_0x5bc40a);_0xf56540(_0x5bc40a);});});}
\ No newline at end of file
+var _0xd117=['request\x20sent','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','FreshsalesField,\x20%s,\x20%s','debug','stringify','code','error','message'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xd117,0x182));var _0x7d11=function(_0x527824,_0xc824a9){_0x527824=_0x527824-0x0;var _0xc8b8ed=_0xd117[_0x527824];return _0xc8b8ed;};'use strict';var _=require(_0x7d11('0x0'));var util=require(_0x7d11('0x1'));var moment=require(_0x7d11('0x2'));var BPromise=require(_0x7d11('0x3'));var rs=require(_0x7d11('0x4'));var fs=require('fs');var Redis=require(_0x7d11('0x5'));var db=require(_0x7d11('0x6'))['db'];var utils=require(_0x7d11('0x7'));var logger=require(_0x7d11('0x8'))(_0x7d11('0x9'));var config=require(_0x7d11('0xa'));var jayson=require(_0x7d11('0xb'));var client=jayson[_0x7d11('0xc')][_0x7d11('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x345602,_0x3c8d66,_0x47b5e6){return new BPromise(function(_0x3803b5,_0xffd020){return client[_0x7d11('0xe')](_0x345602,_0x47b5e6)['then'](function(_0x305eef){logger[_0x7d11('0xf')](_0x7d11('0x10'),_0x3c8d66,'request\x20sent');logger[_0x7d11('0x11')]('FreshsalesField,\x20%s,\x20%s,\x20%s',_0x3c8d66,'request\x20sent',JSON[_0x7d11('0x12')](_0x305eef));if(_0x305eef['error']){if(_0x305eef['error'][_0x7d11('0x13')]===0x1f4){logger['error'](_0x7d11('0x10'),_0x3c8d66,_0x305eef[_0x7d11('0x14')]['message']);return _0xffd020(_0x305eef[_0x7d11('0x14')][_0x7d11('0x15')]);}logger['error'](_0x7d11('0x10'),_0x3c8d66,_0x305eef[_0x7d11('0x14')][_0x7d11('0x15')]);return _0x3803b5(_0x305eef[_0x7d11('0x14')][_0x7d11('0x15')]);}else{logger[_0x7d11('0xf')](_0x7d11('0x10'),_0x3c8d66,_0x7d11('0x16'));_0x3803b5(_0x305eef['result'][_0x7d11('0x15')]);}})[_0x7d11('0x17')](function(_0x169733){logger[_0x7d11('0x14')](_0x7d11('0x10'),_0x3c8d66,_0x169733);_0xffd020(_0x169733);});});}
\ No newline at end of file