Built motion from commit a8c4dd89.|2.6.33
[motion2.git] / server / api / contactItemType / contactItemType.rpc.js
index a14a325..ca1274b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac3d=['ContactItemType,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','then','info'];(function(_0x10dc64,_0x11bb29){var _0x9cf98d=function(_0x558d71){while(--_0x558d71){_0x10dc64['push'](_0x10dc64['shift']());}};_0x9cf98d(++_0x11bb29);}(_0xac3d,0x1ca));var _0xdac3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xac3d[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xdac3('0x0'));var util=require('util');var moment=require(_0xdac3('0x1'));var BPromise=require('bluebird');var rs=require(_0xdac3('0x2'));var fs=require('fs');var Redis=require(_0xdac3('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xdac3('0x4'));var logger=require(_0xdac3('0x5'))(_0xdac3('0x6'));var config=require('../../config/environment');var jayson=require(_0xdac3('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x353a19,_0x41082f,_0x1ff2b6){return new BPromise(function(_0x422329,_0x4a209d){return client['request'](_0x353a19,_0x1ff2b6)[_0xdac3('0x8')](function(_0x5e14ca){logger[_0xdac3('0x9')](_0xdac3('0xa'),_0x41082f,_0xdac3('0xb'));logger['debug']('ContactItemType,\x20%s,\x20%s,\x20%s',_0x41082f,'request\x20sent',JSON[_0xdac3('0xc')](_0x5e14ca));if(_0x5e14ca[_0xdac3('0xd')]){if(_0x5e14ca[_0xdac3('0xd')][_0xdac3('0xe')]===0x1f4){logger['error'](_0xdac3('0xa'),_0x41082f,_0x5e14ca[_0xdac3('0xd')]['message']);return _0x4a209d(_0x5e14ca['error'][_0xdac3('0xf')]);}logger[_0xdac3('0xd')](_0xdac3('0xa'),_0x41082f,_0x5e14ca['error']['message']);return _0x422329(_0x5e14ca[_0xdac3('0xd')][_0xdac3('0xf')]);}else{logger[_0xdac3('0x9')](_0xdac3('0xa'),_0x41082f,'request\x20sent');_0x422329(_0x5e14ca[_0xdac3('0x10')]['message']);}})[_0xdac3('0x11')](function(_0x28102b){logger[_0xdac3('0xd')](_0xdac3('0xa'),_0x41082f,_0x28102b);_0x4a209d(_0x28102b);});});}
\ No newline at end of file
+var _0x51a2=['jayson/promise','http','request','then','info','ContactItemType,\x20%s,\x20%s','ContactItemType,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0xe8b93d,_0x5511fc){var _0x3b2429=function(_0x55da37){while(--_0x55da37){_0xe8b93d['push'](_0xe8b93d['shift']());}};_0x3b2429(++_0x5511fc);}(_0x51a2,0x15c));var _0x251a=function(_0x29ebe1,_0x1d717f){_0x29ebe1=_0x29ebe1-0x0;var _0x57ebce=_0x51a2[_0x29ebe1];return _0x57ebce;};'use strict';var _=require('lodash');var util=require(_0x251a('0x0'));var moment=require(_0x251a('0x1'));var BPromise=require('bluebird');var rs=require(_0x251a('0x2'));var fs=require('fs');var Redis=require(_0x251a('0x3'));var db=require(_0x251a('0x4'))['db'];var utils=require(_0x251a('0x5'));var logger=require(_0x251a('0x6'))(_0x251a('0x7'));var config=require(_0x251a('0x8'));var jayson=require(_0x251a('0x9'));var client=jayson['client'][_0x251a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d6754,_0x4c7657,_0x206468){return new BPromise(function(_0x5125eb,_0x259a0f){return client[_0x251a('0xb')](_0x1d6754,_0x206468)[_0x251a('0xc')](function(_0x3b5068){logger[_0x251a('0xd')](_0x251a('0xe'),_0x4c7657,'request\x20sent');logger['debug'](_0x251a('0xf'),_0x4c7657,_0x251a('0x10'),JSON[_0x251a('0x11')](_0x3b5068));if(_0x3b5068['error']){if(_0x3b5068[_0x251a('0x12')][_0x251a('0x13')]===0x1f4){logger[_0x251a('0x12')]('ContactItemType,\x20%s,\x20%s',_0x4c7657,_0x3b5068['error'][_0x251a('0x14')]);return _0x259a0f(_0x3b5068[_0x251a('0x12')]['message']);}logger['error'](_0x251a('0xe'),_0x4c7657,_0x3b5068[_0x251a('0x12')]['message']);return _0x5125eb(_0x3b5068[_0x251a('0x12')][_0x251a('0x14')]);}else{logger['info'](_0x251a('0xe'),_0x4c7657,_0x251a('0x10'));_0x5125eb(_0x3b5068['result'][_0x251a('0x14')]);}})['catch'](function(_0x2beb48){logger[_0x251a('0x12')](_0x251a('0xe'),_0x4c7657,_0x2beb48);_0x259a0f(_0x2beb48);});});}
\ No newline at end of file