Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index 0f94c84..ed780eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x89ac=['body','options','raw','attributes','limit','debug','AddTagsToOpenchannelInteraction','OpenchannelInteraction','find','where','addTags','ids','omit','AddTags','lodash','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','register','request','then','OpenchannelInteraction,\x20%s,\x20%s','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','UpdateOpenchannelInteraction','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x89ac,0x89));var _0xc89a=function(_0x24c733,_0x525907){_0x24c733=_0x24c733-0x0;var _0x21a2d3=_0x89ac[_0x24c733];return _0x21a2d3;};'use strict';var _=require(_0xc89a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc89a('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc89a('0x2'));var db=require(_0xc89a('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xc89a('0x4'))(_0xc89a('0x5'));var config=require(_0xc89a('0x6'));var jayson=require(_0xc89a('0x7'));var client=jayson['client'][_0xc89a('0x8')]({'port':0x232a});config[_0xc89a('0x9')]=_[_0xc89a('0xa')](config[_0xc89a('0x9')],{'host':_0xc89a('0xb'),'port':0x18eb});var socket=require(_0xc89a('0xc'))(new Redis(config[_0xc89a('0x9')]));require('./openchannelInteraction.socket')[_0xc89a('0xd')](socket);function respondWithRpcPromise(_0x3d3cf6,_0x499db2,_0x485efe){return new BPromise(function(_0x487194,_0xe5b8ca){return client[_0xc89a('0xe')](_0x3d3cf6,_0x485efe)[_0xc89a('0xf')](function(_0x1db47e){logger['info'](_0xc89a('0x10'),_0x499db2,'request\x20sent');logger['debug'](_0xc89a('0x11'),_0x499db2,_0xc89a('0x12'),JSON[_0xc89a('0x13')](_0x1db47e));if(_0x1db47e['error']){if(_0x1db47e[_0xc89a('0x14')][_0xc89a('0x15')]===0x1f4){logger[_0xc89a('0x14')](_0xc89a('0x10'),_0x499db2,_0x1db47e[_0xc89a('0x14')]['message']);return _0xe5b8ca(_0x1db47e[_0xc89a('0x14')][_0xc89a('0x16')]);}logger[_0xc89a('0x14')](_0xc89a('0x10'),_0x499db2,_0x1db47e[_0xc89a('0x14')][_0xc89a('0x16')]);return _0x487194(_0x1db47e[_0xc89a('0x14')][_0xc89a('0x16')]);}else{logger[_0xc89a('0x17')](_0xc89a('0x10'),_0x499db2,_0xc89a('0x12'));_0x487194(_0x1db47e['result'][_0xc89a('0x16')]);}})[_0xc89a('0x18')](function(_0x1d32f1){logger[_0xc89a('0x14')]('OpenchannelInteraction,\x20%s,\x20%s',_0x499db2,_0x1d32f1);_0xe5b8ca(_0x1d32f1);});});}exports[_0xc89a('0x19')]=function(_0x32b9ee){var _0x1cd583=this;return new Promise(function(_0xbeefd0,_0x106767){return db['OpenchannelInteraction'][_0xc89a('0x1a')](_0x32b9ee[_0xc89a('0x1b')],{'raw':_0x32b9ee['options']?_0x32b9ee[_0xc89a('0x1c')][_0xc89a('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x32b9ee['options']?_0x32b9ee[_0xc89a('0x1c')]['where']||null:null,'attributes':_0x32b9ee[_0xc89a('0x1c')]?_0x32b9ee[_0xc89a('0x1c')][_0xc89a('0x1e')]||null:null,'limit':_0x32b9ee[_0xc89a('0x1c')]?_0x32b9ee[_0xc89a('0x1c')][_0xc89a('0x1f')]||null:null})[_0xc89a('0xf')](function(_0x21940e){logger['info'](_0xc89a('0x19'),_0x32b9ee);logger[_0xc89a('0x20')]('UpdateOpenchannelInteraction',_0x32b9ee,JSON[_0xc89a('0x13')](_0x21940e));_0xbeefd0(_0x21940e);})[_0xc89a('0x18')](function(_0x1d9ea5){logger[_0xc89a('0x14')]('UpdateOpenchannelInteraction',_0x1d9ea5[_0xc89a('0x16')],_0x32b9ee);_0x106767(_0x1cd583[_0xc89a('0x14')](0x1f4,_0x1d9ea5[_0xc89a('0x16')]));});});};exports[_0xc89a('0x21')]=function(_0x5a2e26){return new Promise(function(_0x112701,_0x3a02d9){return db[_0xc89a('0x22')][_0xc89a('0x23')]({'where':_0x5a2e26[_0xc89a('0x1c')]?_0x5a2e26[_0xc89a('0x1c')][_0xc89a('0x24')]||null:null})[_0xc89a('0xf')](function(_0x6bd449){if(_0x6bd449){return _0x6bd449[_0xc89a('0x25')](_0x5a2e26[_0xc89a('0x1b')][_0xc89a('0x26')],_[_0xc89a('0x27')](_0x5a2e26[_0xc89a('0x1b')],[_0xc89a('0x26'),'id'])||{});}})['spread'](function(_0x24efd0){logger['info'](_0xc89a('0x28'),_0x5a2e26);logger['debug'](_0xc89a('0x28'),_0x5a2e26,JSON[_0xc89a('0x13')](_0x24efd0));_0x112701(_0x24efd0);})[_0xc89a('0x18')](function(_0x2b0fc1){logger[_0xc89a('0x14')](_0xc89a('0x28'),_0x2b0fc1[_0xc89a('0x16')],_0x5a2e26);_0x3a02d9(_this[_0xc89a('0x14')](0x1f4,_0x2b0fc1[_0xc89a('0x16')]));});});};
\ No newline at end of file
+var _0x214f=['defaults','localhost','socket.io-emitter','register','then','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','body','options','raw','where','debug','AddTagsToOpenchannelInteraction','find','addTags','ids','omit','spread','AddTags','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','redis'];(function(_0x8a969d,_0x339d9f){var _0x1d8dc7=function(_0x283ec0){while(--_0x283ec0){_0x8a969d['push'](_0x8a969d['shift']());}};_0x1d8dc7(++_0x339d9f);}(_0x214f,0x6f));var _0xf214=function(_0x2a911f,_0x79ee44){_0x2a911f=_0x2a911f-0x0;var _0x4eafde=_0x214f[_0x2a911f];return _0x4eafde;};'use strict';var _=require('lodash');var util=require(_0xf214('0x0'));var moment=require(_0xf214('0x1'));var BPromise=require(_0xf214('0x2'));var rs=require(_0xf214('0x3'));var fs=require('fs');var Redis=require(_0xf214('0x4'));var db=require(_0xf214('0x5'))['db'];var utils=require(_0xf214('0x6'));var logger=require(_0xf214('0x7'))(_0xf214('0x8'));var config=require('../../config/environment');var jayson=require(_0xf214('0x9'));var client=jayson['client'][_0xf214('0xa')]({'port':0x232a});config[_0xf214('0xb')]=_[_0xf214('0xc')](config['redis'],{'host':_0xf214('0xd'),'port':0x18eb});var socket=require(_0xf214('0xe'))(new Redis(config[_0xf214('0xb')]));require('./openchannelInteraction.socket')[_0xf214('0xf')](socket);function respondWithRpcPromise(_0x1a8cbe,_0x129627,_0x5960f2){return new BPromise(function(_0x63f600,_0x4fc071){return client['request'](_0x1a8cbe,_0x5960f2)[_0xf214('0x10')](function(_0x1ce233){logger[_0xf214('0x11')](_0xf214('0x12'),_0x129627,_0xf214('0x13'));logger['debug'](_0xf214('0x14'),_0x129627,_0xf214('0x13'),JSON[_0xf214('0x15')](_0x1ce233));if(_0x1ce233['error']){if(_0x1ce233['error'][_0xf214('0x16')]===0x1f4){logger[_0xf214('0x17')](_0xf214('0x12'),_0x129627,_0x1ce233[_0xf214('0x17')][_0xf214('0x18')]);return _0x4fc071(_0x1ce233[_0xf214('0x17')][_0xf214('0x18')]);}logger[_0xf214('0x17')](_0xf214('0x12'),_0x129627,_0x1ce233['error'][_0xf214('0x18')]);return _0x63f600(_0x1ce233[_0xf214('0x17')][_0xf214('0x18')]);}else{logger[_0xf214('0x11')](_0xf214('0x12'),_0x129627,'request\x20sent');_0x63f600(_0x1ce233[_0xf214('0x19')]['message']);}})[_0xf214('0x1a')](function(_0x5834d4){logger[_0xf214('0x17')](_0xf214('0x12'),_0x129627,_0x5834d4);_0x4fc071(_0x5834d4);});});}exports[_0xf214('0x1b')]=function(_0x193b5d){var _0x56b2f9=this;return new Promise(function(_0x4ce6a1,_0x16a30c){return db[_0xf214('0x1c')]['update'](_0x193b5d[_0xf214('0x1d')],{'raw':_0x193b5d[_0xf214('0x1e')]?_0x193b5d[_0xf214('0x1e')][_0xf214('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x193b5d[_0xf214('0x1e')]?_0x193b5d[_0xf214('0x1e')][_0xf214('0x20')]||null:null,'attributes':_0x193b5d[_0xf214('0x1e')]?_0x193b5d['options']['attributes']||null:null,'limit':_0x193b5d[_0xf214('0x1e')]?_0x193b5d[_0xf214('0x1e')]['limit']||null:null})[_0xf214('0x10')](function(_0x2b476e){logger[_0xf214('0x11')]('UpdateOpenchannelInteraction',_0x193b5d);logger[_0xf214('0x21')](_0xf214('0x1b'),_0x193b5d,JSON[_0xf214('0x15')](_0x2b476e));_0x4ce6a1(_0x2b476e);})[_0xf214('0x1a')](function(_0x31d56c){logger[_0xf214('0x17')]('UpdateOpenchannelInteraction',_0x31d56c[_0xf214('0x18')],_0x193b5d);_0x16a30c(_0x56b2f9[_0xf214('0x17')](0x1f4,_0x31d56c[_0xf214('0x18')]));});});};exports[_0xf214('0x22')]=function(_0x1d4f1f){return new Promise(function(_0x416b2c,_0x2f3c2c){return db[_0xf214('0x1c')][_0xf214('0x23')]({'where':_0x1d4f1f[_0xf214('0x1e')]?_0x1d4f1f['options'][_0xf214('0x20')]||null:null})[_0xf214('0x10')](function(_0x174413){if(_0x174413){return _0x174413[_0xf214('0x24')](_0x1d4f1f[_0xf214('0x1d')][_0xf214('0x25')],_[_0xf214('0x26')](_0x1d4f1f[_0xf214('0x1d')],[_0xf214('0x25'),'id'])||{});}})[_0xf214('0x27')](function(_0x5d0fbd){logger[_0xf214('0x11')](_0xf214('0x28'),_0x1d4f1f);logger[_0xf214('0x21')](_0xf214('0x28'),_0x1d4f1f,JSON['stringify'](_0x5d0fbd));_0x416b2c(_0x5d0fbd);})[_0xf214('0x1a')](function(_0x1e357c){logger[_0xf214('0x17')]('AddTags',_0x1e357c['message'],_0x1d4f1f);_0x2f3c2c(_this['error'](0x1f4,_0x1e357c[_0xf214('0x18')]));});});};
\ No newline at end of file