Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index ed780eb..3235a2c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x216b=['raw','where','limit','AddTagsToOpenchannelInteraction','find','addTags','body','omit','ids','spread','AddTags','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','redis','defaults','./openchannelInteraction.socket','request','then','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','error','message','info','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','options'];(function(_0x22af96,_0x55ba2c){var _0x3e1fd4=function(_0x4f38b4){while(--_0x4f38b4){_0x22af96['push'](_0x22af96['shift']());}};_0x3e1fd4(++_0x55ba2c);}(_0x216b,0xcf));var _0xb216=function(_0x4c681a,_0xa30696){_0x4c681a=_0x4c681a-0x0;var _0x5064bb=_0x216b[_0x4c681a];return _0x5064bb;};'use strict';var _=require(_0xb216('0x0'));var util=require(_0xb216('0x1'));var moment=require(_0xb216('0x2'));var BPromise=require(_0xb216('0x3'));var rs=require(_0xb216('0x4'));var fs=require('fs');var Redis=require(_0xb216('0x5'));var db=require(_0xb216('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xb216('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xb216('0x8'));var client=jayson[_0xb216('0x9')]['http']({'port':0x232a});config[_0xb216('0xa')]=_[_0xb216('0xb')](config[_0xb216('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xb216('0xc'))['register'](socket);function respondWithRpcPromise(_0x1ecb45,_0xb6670,_0x4ef906){return new BPromise(function(_0x14d0ea,_0x1d3e39){return client[_0xb216('0xd')](_0x1ecb45,_0x4ef906)[_0xb216('0xe')](function(_0x238061){logger['info'](_0xb216('0xf'),_0xb6670,_0xb216('0x10'));logger[_0xb216('0x11')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0xb6670,'request\x20sent',JSON['stringify'](_0x238061));if(_0x238061[_0xb216('0x12')]){if(_0x238061[_0xb216('0x12')]['code']===0x1f4){logger['error'](_0xb216('0xf'),_0xb6670,_0x238061[_0xb216('0x12')][_0xb216('0x13')]);return _0x1d3e39(_0x238061['error'][_0xb216('0x13')]);}logger[_0xb216('0x12')](_0xb216('0xf'),_0xb6670,_0x238061[_0xb216('0x12')]['message']);return _0x14d0ea(_0x238061[_0xb216('0x12')]['message']);}else{logger[_0xb216('0x14')](_0xb216('0xf'),_0xb6670,_0xb216('0x10'));_0x14d0ea(_0x238061[_0xb216('0x15')][_0xb216('0x13')]);}})[_0xb216('0x16')](function(_0x11c8df){logger['error']('OpenchannelInteraction,\x20%s,\x20%s',_0xb6670,_0x11c8df);_0x1d3e39(_0x11c8df);});});}exports[_0xb216('0x17')]=function(_0x300752){var _0x32605b=this;return new Promise(function(_0x32be9f,_0x55a714){return db[_0xb216('0x18')][_0xb216('0x19')](_0x300752['body'],{'raw':_0x300752['options']?_0x300752[_0xb216('0x1a')][_0xb216('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x300752[_0xb216('0x1a')]?_0x300752['options'][_0xb216('0x1c')]||null:null,'attributes':_0x300752['options']?_0x300752['options']['attributes']||null:null,'limit':_0x300752['options']?_0x300752[_0xb216('0x1a')][_0xb216('0x1d')]||null:null})[_0xb216('0xe')](function(_0xc388ab){logger[_0xb216('0x14')]('UpdateOpenchannelInteraction',_0x300752);logger[_0xb216('0x11')](_0xb216('0x17'),_0x300752,JSON['stringify'](_0xc388ab));_0x32be9f(_0xc388ab);})[_0xb216('0x16')](function(_0xc0dbba){logger['error'](_0xb216('0x17'),_0xc0dbba['message'],_0x300752);_0x55a714(_0x32605b['error'](0x1f4,_0xc0dbba[_0xb216('0x13')]));});});};exports[_0xb216('0x1e')]=function(_0x236b16){return new Promise(function(_0x34a5ad,_0x3d8851){return db[_0xb216('0x18')][_0xb216('0x1f')]({'where':_0x236b16[_0xb216('0x1a')]?_0x236b16['options'][_0xb216('0x1c')]||null:null})[_0xb216('0xe')](function(_0x36d6d5){if(_0x36d6d5){return _0x36d6d5[_0xb216('0x20')](_0x236b16[_0xb216('0x21')]['ids'],_[_0xb216('0x22')](_0x236b16[_0xb216('0x21')],[_0xb216('0x23'),'id'])||{});}})[_0xb216('0x24')](function(_0x29702f){logger[_0xb216('0x14')](_0xb216('0x25'),_0x236b16);logger[_0xb216('0x11')](_0xb216('0x25'),_0x236b16,JSON[_0xb216('0x26')](_0x29702f));_0x34a5ad(_0x29702f);})[_0xb216('0x16')](function(_0x55ac44){logger[_0xb216('0x12')](_0xb216('0x25'),_0x55ac44[_0xb216('0x13')],_0x236b16);_0x3d8851(_this[_0xb216('0x12')](0x1f4,_0x55ac44[_0xb216('0x13')]));});});};
\ No newline at end of file