Built motion from commit b5996064.|2.6.21
[motion2.git] / server / api / userProfile / userProfile.rpc.js
index 500afc5..4965b73 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0650=['register','request','then','info','debug','stringify','error','UserProfile,\x20%s,\x20%s','message','request\x20sent','result','catch','lodash','util','moment','bluebird','ioredis','../../config/logger','rpc','../../config/environment','http','socket.io-emitter','./userProfile.socket'];(function(_0x5f584a,_0x47f064){var _0x3788d9=function(_0x29c10b){while(--_0x29c10b){_0x5f584a['push'](_0x5f584a['shift']());}};_0x3788d9(++_0x47f064);}(_0x0650,0x1aa));var _0x0065=function(_0x59d89e,_0x55edf5){_0x59d89e=_0x59d89e-0x0;var _0x554e93=_0x0650[_0x59d89e];return _0x554e93;};'use strict';var _=require(_0x0065('0x0'));var util=require(_0x0065('0x1'));var moment=require(_0x0065('0x2'));var BPromise=require(_0x0065('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0065('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x0065('0x5'))(_0x0065('0x6'));var config=require(_0x0065('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x0065('0x8')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x0065('0x9'))(new Redis(config['redis']));require(_0x0065('0xa'))[_0x0065('0xb')](socket);function respondWithRpcPromise(_0x4a72bf,_0x2afe89,_0x41e9de){return new BPromise(function(_0x49ef12,_0x535a92){return client[_0x0065('0xc')](_0x4a72bf,_0x41e9de)[_0x0065('0xd')](function(_0x2ba986){logger[_0x0065('0xe')]('UserProfile,\x20%s,\x20%s',_0x2afe89,'request\x20sent');logger[_0x0065('0xf')]('UserProfile,\x20%s,\x20%s,\x20%s',_0x2afe89,'request\x20sent',JSON[_0x0065('0x10')](_0x2ba986));if(_0x2ba986['error']){if(_0x2ba986[_0x0065('0x11')]['code']===0x1f4){logger['error'](_0x0065('0x12'),_0x2afe89,_0x2ba986[_0x0065('0x11')][_0x0065('0x13')]);return _0x535a92(_0x2ba986[_0x0065('0x11')][_0x0065('0x13')]);}logger[_0x0065('0x11')](_0x0065('0x12'),_0x2afe89,_0x2ba986[_0x0065('0x11')]['message']);return _0x49ef12(_0x2ba986[_0x0065('0x11')][_0x0065('0x13')]);}else{logger[_0x0065('0xe')](_0x0065('0x12'),_0x2afe89,_0x0065('0x14'));_0x49ef12(_0x2ba986[_0x0065('0x15')][_0x0065('0x13')]);}})[_0x0065('0x16')](function(_0x179f85){logger[_0x0065('0x11')]('UserProfile,\x20%s,\x20%s',_0x2afe89,_0x179f85);_0x535a92(_0x179f85);});});}
\ No newline at end of file
+var _0x06ae=['UserProfile,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','redis','defaults','localhost','request','then','info','UserProfile,\x20%s,\x20%s','debug'];(function(_0x26a906,_0x3d135c){var _0x495575=function(_0x2365af){while(--_0x2365af){_0x26a906['push'](_0x26a906['shift']());}};_0x495575(++_0x3d135c);}(_0x06ae,0x16e));var _0xe06a=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x06ae[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var util=require(_0xe06a('0x0'));var moment=require(_0xe06a('0x1'));var BPromise=require(_0xe06a('0x2'));var rs=require(_0xe06a('0x3'));var fs=require('fs');var Redis=require(_0xe06a('0x4'));var db=require(_0xe06a('0x5'))['db'];var utils=require(_0xe06a('0x6'));var logger=require(_0xe06a('0x7'))(_0xe06a('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xe06a('0x9')]({'port':0x232a});config[_0xe06a('0xa')]=_[_0xe06a('0xb')](config[_0xe06a('0xa')],{'host':_0xe06a('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe06a('0xa')]));require('./userProfile.socket')['register'](socket);function respondWithRpcPromise(_0x1a9f4e,_0x4eedc5,_0x2212e2){return new BPromise(function(_0x48e52a,_0x521741){return client[_0xe06a('0xd')](_0x1a9f4e,_0x2212e2)[_0xe06a('0xe')](function(_0x574fd0){logger[_0xe06a('0xf')](_0xe06a('0x10'),_0x4eedc5,'request\x20sent');logger[_0xe06a('0x11')](_0xe06a('0x12'),_0x4eedc5,_0xe06a('0x13'),JSON['stringify'](_0x574fd0));if(_0x574fd0[_0xe06a('0x14')]){if(_0x574fd0[_0xe06a('0x14')][_0xe06a('0x15')]===0x1f4){logger[_0xe06a('0x14')](_0xe06a('0x10'),_0x4eedc5,_0x574fd0['error'][_0xe06a('0x16')]);return _0x521741(_0x574fd0[_0xe06a('0x14')][_0xe06a('0x16')]);}logger[_0xe06a('0x14')](_0xe06a('0x10'),_0x4eedc5,_0x574fd0[_0xe06a('0x14')]['message']);return _0x48e52a(_0x574fd0[_0xe06a('0x14')]['message']);}else{logger['info']('UserProfile,\x20%s,\x20%s',_0x4eedc5,_0xe06a('0x13'));_0x48e52a(_0x574fd0[_0xe06a('0x17')][_0xe06a('0x16')]);}})['catch'](function(_0x614743){logger[_0xe06a('0x14')]('UserProfile,\x20%s,\x20%s',_0x4eedc5,_0x614743);_0x521741(_0x614743);});});}
\ No newline at end of file