Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / chatWebsite / chatWebsite.rpc.js
index 1f2fd6a..ed1d931 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1889=['message','result','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./chatWebsite.socket','register','then','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','ChatWebsite,\x20%s,\x20%s'];(function(_0x597da3,_0x51b62b){var _0xd3cd83=function(_0x4a92df){while(--_0x4a92df){_0x597da3['push'](_0x597da3['shift']());}};_0xd3cd83(++_0x51b62b);}(_0x1889,0x92));var _0x9188=function(_0x4cf4a4,_0xb50574){_0x4cf4a4=_0x4cf4a4-0x0;var _0x22d797=_0x1889[_0x4cf4a4];return _0x22d797;};'use strict';var _=require(_0x9188('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9188('0x1'));var fs=require('fs');var Redis=require(_0x9188('0x2'));var db=require(_0x9188('0x3'))['db'];var utils=require(_0x9188('0x4'));var logger=require(_0x9188('0x5'))(_0x9188('0x6'));var config=require('../../config/environment');var jayson=require(_0x9188('0x7'));var client=jayson[_0x9188('0x8')]['http']({'port':0x232a});config['redis']=_[_0x9188('0x9')](config[_0x9188('0xa')],{'host':_0x9188('0xb'),'port':0x18eb});var socket=require(_0x9188('0xc'))(new Redis(config['redis']));require(_0x9188('0xd'))[_0x9188('0xe')](socket);function respondWithRpcPromise(_0x237d7f,_0x1b4cd5,_0x4bfb55){return new BPromise(function(_0x8dc703,_0x376d9a){return client['request'](_0x237d7f,_0x4bfb55)[_0x9188('0xf')](function(_0x4da4f1){logger['info']('ChatWebsite,\x20%s,\x20%s',_0x1b4cd5,'request\x20sent');logger[_0x9188('0x10')](_0x9188('0x11'),_0x1b4cd5,_0x9188('0x12'),JSON[_0x9188('0x13')](_0x4da4f1));if(_0x4da4f1[_0x9188('0x14')]){if(_0x4da4f1[_0x9188('0x14')]['code']===0x1f4){logger[_0x9188('0x14')](_0x9188('0x15'),_0x1b4cd5,_0x4da4f1[_0x9188('0x14')][_0x9188('0x16')]);return _0x376d9a(_0x4da4f1['error'][_0x9188('0x16')]);}logger[_0x9188('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x1b4cd5,_0x4da4f1['error']['message']);return _0x8dc703(_0x4da4f1['error'][_0x9188('0x16')]);}else{logger['info'](_0x9188('0x15'),_0x1b4cd5,'request\x20sent');_0x8dc703(_0x4da4f1[_0x9188('0x17')]['message']);}})['catch'](function(_0x343815){logger[_0x9188('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x1b4cd5,_0x343815);_0x376d9a(_0x343815);});});}
\ No newline at end of file
+var _0x3b0a=['ChatWebsite,\x20%s,\x20%s','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info'];(function(_0x36884e,_0x48008f){var _0x1cc367=function(_0x388a78){while(--_0x388a78){_0x36884e['push'](_0x36884e['shift']());}};_0x1cc367(++_0x48008f);}(_0x3b0a,0x1c2));var _0xa3b0=function(_0x1fedd9,_0x5352b2){_0x1fedd9=_0x1fedd9-0x0;var _0x426583=_0x3b0a[_0x1fedd9];return _0x426583;};'use strict';var _=require(_0xa3b0('0x0'));var util=require('util');var moment=require(_0xa3b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xa3b0('0x2'));var fs=require('fs');var Redis=require(_0xa3b0('0x3'));var db=require(_0xa3b0('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa3b0('0x5'))('rpc');var config=require(_0xa3b0('0x6'));var jayson=require(_0xa3b0('0x7'));var client=jayson[_0xa3b0('0x8')][_0xa3b0('0x9')]({'port':0x232a});config[_0xa3b0('0xa')]=_[_0xa3b0('0xb')](config[_0xa3b0('0xa')],{'host':_0xa3b0('0xc'),'port':0x18eb});var socket=require(_0xa3b0('0xd'))(new Redis(config[_0xa3b0('0xa')]));require('./chatWebsite.socket')[_0xa3b0('0xe')](socket);function respondWithRpcPromise(_0x15273f,_0x15d32b,_0xfde187){return new BPromise(function(_0x42e0b4,_0x517fef){return client[_0xa3b0('0xf')](_0x15273f,_0xfde187)[_0xa3b0('0x10')](function(_0x38efc2){logger[_0xa3b0('0x11')](_0xa3b0('0x12'),_0x15d32b,'request\x20sent');logger['debug'](_0xa3b0('0x13'),_0x15d32b,_0xa3b0('0x14'),JSON[_0xa3b0('0x15')](_0x38efc2));if(_0x38efc2[_0xa3b0('0x16')]){if(_0x38efc2[_0xa3b0('0x16')]['code']===0x1f4){logger[_0xa3b0('0x16')](_0xa3b0('0x12'),_0x15d32b,_0x38efc2[_0xa3b0('0x16')][_0xa3b0('0x17')]);return _0x517fef(_0x38efc2[_0xa3b0('0x16')][_0xa3b0('0x17')]);}logger[_0xa3b0('0x16')]('ChatWebsite,\x20%s,\x20%s',_0x15d32b,_0x38efc2[_0xa3b0('0x16')][_0xa3b0('0x17')]);return _0x42e0b4(_0x38efc2['error']['message']);}else{logger[_0xa3b0('0x11')]('ChatWebsite,\x20%s,\x20%s',_0x15d32b,_0xa3b0('0x14'));_0x42e0b4(_0x38efc2[_0xa3b0('0x18')]['message']);}})[_0xa3b0('0x19')](function(_0x4001ad){logger[_0xa3b0('0x16')]('ChatWebsite,\x20%s,\x20%s',_0x15d32b,_0x4001ad);_0x517fef(_0x4001ad);});});}
\ No newline at end of file