Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / userProfile / userProfile.rpc.js
index 4798895..1fcbb40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ca=['message','result','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','register','info','UserProfile,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf2ca,0x16a));var _0xaf2c=function(_0x45aa72,_0x8af642){_0x45aa72=_0x45aa72-0x0;var _0x75adaa=_0xf2ca[_0x45aa72];return _0x75adaa;};'use strict';var _=require(_0xaf2c('0x0'));var util=require(_0xaf2c('0x1'));var moment=require(_0xaf2c('0x2'));var BPromise=require('bluebird');var rs=require(_0xaf2c('0x3'));var fs=require('fs');var Redis=require(_0xaf2c('0x4'));var db=require(_0xaf2c('0x5'))['db'];var utils=require(_0xaf2c('0x6'));var logger=require(_0xaf2c('0x7'))(_0xaf2c('0x8'));var config=require('../../config/environment');var jayson=require(_0xaf2c('0x9'));var client=jayson[_0xaf2c('0xa')][_0xaf2c('0xb')]({'port':0x232a});config[_0xaf2c('0xc')]=_['defaults'](config[_0xaf2c('0xc')],{'host':_0xaf2c('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xaf2c('0xc')]));require('./userProfile.socket')[_0xaf2c('0xe')](socket);function respondWithRpcPromise(_0x4a0064,_0x2f5099,_0x144a7a){return new BPromise(function(_0x2e04e5,_0xd891e9){return client['request'](_0x4a0064,_0x144a7a)['then'](function(_0x2c0d88){logger[_0xaf2c('0xf')](_0xaf2c('0x10'),_0x2f5099,_0xaf2c('0x11'));logger[_0xaf2c('0x12')]('UserProfile,\x20%s,\x20%s,\x20%s',_0x2f5099,'request\x20sent',JSON[_0xaf2c('0x13')](_0x2c0d88));if(_0x2c0d88[_0xaf2c('0x14')]){if(_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x15')]===0x1f4){logger[_0xaf2c('0x14')](_0xaf2c('0x10'),_0x2f5099,_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x16')]);return _0xd891e9(_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x16')]);}logger[_0xaf2c('0x14')](_0xaf2c('0x10'),_0x2f5099,_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x16')]);return _0x2e04e5(_0x2c0d88[_0xaf2c('0x14')]['message']);}else{logger[_0xaf2c('0xf')]('UserProfile,\x20%s,\x20%s',_0x2f5099,_0xaf2c('0x11'));_0x2e04e5(_0x2c0d88[_0xaf2c('0x17')][_0xaf2c('0x16')]);}})['catch'](function(_0x28ae7b){logger[_0xaf2c('0x14')](_0xaf2c('0x10'),_0x2f5099,_0x28ae7b);_0xd891e9(_0x28ae7b);});});}
\ No newline at end of file
+var _0x8ff3=['../../config/utils','../../config/environment','client','redis','defaults','localhost','socket.io-emitter','./userProfile.socket','register','then','info','request\x20sent','debug','UserProfile,\x20%s,\x20%s,\x20%s','error','UserProfile,\x20%s,\x20%s','message','result','lodash','util','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x4c260a,_0x148241){var _0x17bbdd=function(_0x4f3e9f){while(--_0x4f3e9f){_0x4c260a['push'](_0x4c260a['shift']());}};_0x17bbdd(++_0x148241);}(_0x8ff3,0x72));var _0x38ff=function(_0x2e9b61,_0x2120cf){_0x2e9b61=_0x2e9b61-0x0;var _0x597ccd=_0x8ff3[_0x2e9b61];return _0x597ccd;};'use strict';var _=require(_0x38ff('0x0'));var util=require(_0x38ff('0x1'));var moment=require('moment');var BPromise=require(_0x38ff('0x2'));var rs=require(_0x38ff('0x3'));var fs=require('fs');var Redis=require(_0x38ff('0x4'));var db=require(_0x38ff('0x5'))['db'];var utils=require(_0x38ff('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x38ff('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x38ff('0x8')]['http']({'port':0x232a});config[_0x38ff('0x9')]=_[_0x38ff('0xa')](config[_0x38ff('0x9')],{'host':_0x38ff('0xb'),'port':0x18eb});var socket=require(_0x38ff('0xc'))(new Redis(config[_0x38ff('0x9')]));require(_0x38ff('0xd'))[_0x38ff('0xe')](socket);function respondWithRpcPromise(_0x17820a,_0x3a701b,_0x261325){return new BPromise(function(_0x217abf,_0x11058d){return client['request'](_0x17820a,_0x261325)[_0x38ff('0xf')](function(_0x9d5d77){logger[_0x38ff('0x10')]('UserProfile,\x20%s,\x20%s',_0x3a701b,_0x38ff('0x11'));logger[_0x38ff('0x12')](_0x38ff('0x13'),_0x3a701b,_0x38ff('0x11'),JSON['stringify'](_0x9d5d77));if(_0x9d5d77[_0x38ff('0x14')]){if(_0x9d5d77[_0x38ff('0x14')]['code']===0x1f4){logger[_0x38ff('0x14')](_0x38ff('0x15'),_0x3a701b,_0x9d5d77[_0x38ff('0x14')]['message']);return _0x11058d(_0x9d5d77[_0x38ff('0x14')]['message']);}logger[_0x38ff('0x14')]('UserProfile,\x20%s,\x20%s',_0x3a701b,_0x9d5d77[_0x38ff('0x14')]['message']);return _0x217abf(_0x9d5d77['error'][_0x38ff('0x16')]);}else{logger[_0x38ff('0x10')](_0x38ff('0x15'),_0x3a701b,_0x38ff('0x11'));_0x217abf(_0x9d5d77[_0x38ff('0x17')][_0x38ff('0x16')]);}})['catch'](function(_0x2f9a29){logger[_0x38ff('0x14')]('UserProfile,\x20%s,\x20%s',_0x3a701b,_0x2f9a29);_0x11058d(_0x2f9a29);});});}
\ No newline at end of file