Built motion from commit f0b1811d.|2.6.6
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index a05fe32..6c0afda 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a01=['./openchannelInteraction.socket','then','info','request\x20sent','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelInteraction,\x20%s,\x20%s','message','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','options','raw','where','attributes','limit','debug','AddTagsToOpenchannelInteraction','find','addTags','body','ids','spread','AddTags','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','defaults','redis','localhost','socket.io-emitter'];(function(_0x4b3479,_0x187c0a){var _0x1d7df6=function(_0x277507){while(--_0x277507){_0x4b3479['push'](_0x4b3479['shift']());}};_0x1d7df6(++_0x187c0a);}(_0x2a01,0x15b));var _0x12a0=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0x2a01[_0x46e363];return _0x3fb059;};'use strict';var _=require(_0x12a0('0x0'));var util=require('util');var moment=require(_0x12a0('0x1'));var BPromise=require('bluebird');var rs=require(_0x12a0('0x2'));var fs=require('fs');var Redis=require(_0x12a0('0x3'));var db=require(_0x12a0('0x4'))['db'];var utils=require(_0x12a0('0x5'));var logger=require(_0x12a0('0x6'))(_0x12a0('0x7'));var config=require(_0x12a0('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0x12a0('0x9')](config[_0x12a0('0xa')],{'host':_0x12a0('0xb'),'port':0x18eb});var socket=require(_0x12a0('0xc'))(new Redis(config['redis']));require(_0x12a0('0xd'))['register'](socket);function respondWithRpcPromise(_0x23b9d5,_0x32c4b4,_0x1d8fbb){return new BPromise(function(_0x1bf4f0,_0x26a76b){return client['request'](_0x23b9d5,_0x1d8fbb)[_0x12a0('0xe')](function(_0x41e96b){logger[_0x12a0('0xf')]('OpenchannelInteraction,\x20%s,\x20%s',_0x32c4b4,_0x12a0('0x10'));logger['debug'](_0x12a0('0x11'),_0x32c4b4,_0x12a0('0x10'),JSON[_0x12a0('0x12')](_0x41e96b));if(_0x41e96b['error']){if(_0x41e96b[_0x12a0('0x13')][_0x12a0('0x14')]===0x1f4){logger['error'](_0x12a0('0x15'),_0x32c4b4,_0x41e96b['error'][_0x12a0('0x16')]);return _0x26a76b(_0x41e96b['error'][_0x12a0('0x16')]);}logger['error'](_0x12a0('0x15'),_0x32c4b4,_0x41e96b[_0x12a0('0x13')][_0x12a0('0x16')]);return _0x1bf4f0(_0x41e96b[_0x12a0('0x13')][_0x12a0('0x16')]);}else{logger[_0x12a0('0xf')](_0x12a0('0x15'),_0x32c4b4,'request\x20sent');_0x1bf4f0(_0x41e96b['result'][_0x12a0('0x16')]);}})[_0x12a0('0x17')](function(_0x2c163d){logger['error']('OpenchannelInteraction,\x20%s,\x20%s',_0x32c4b4,_0x2c163d);_0x26a76b(_0x2c163d);});});}exports[_0x12a0('0x18')]=function(_0x5a075b){var _0x563e95=this;return new Promise(function(_0x528bd4,_0x5a15b0){return db[_0x12a0('0x19')][_0x12a0('0x1a')](_0x5a075b['body'],{'raw':_0x5a075b[_0x12a0('0x1b')]?_0x5a075b[_0x12a0('0x1b')][_0x12a0('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5a075b[_0x12a0('0x1b')]?_0x5a075b[_0x12a0('0x1b')][_0x12a0('0x1d')]||null:null,'attributes':_0x5a075b['options']?_0x5a075b[_0x12a0('0x1b')][_0x12a0('0x1e')]||null:null,'limit':_0x5a075b['options']?_0x5a075b['options'][_0x12a0('0x1f')]||null:null})[_0x12a0('0xe')](function(_0x2bb5dd){logger[_0x12a0('0xf')]('UpdateOpenchannelInteraction',_0x5a075b);logger[_0x12a0('0x20')]('UpdateOpenchannelInteraction',_0x5a075b,JSON[_0x12a0('0x12')](_0x2bb5dd));_0x528bd4(_0x2bb5dd);})[_0x12a0('0x17')](function(_0x347f6f){logger['error'](_0x12a0('0x18'),_0x347f6f[_0x12a0('0x16')],_0x5a075b);_0x5a15b0(_0x563e95[_0x12a0('0x13')](0x1f4,_0x347f6f[_0x12a0('0x16')]));});});};exports[_0x12a0('0x21')]=function(_0x1eea8c){return new Promise(function(_0x224e1f,_0x26cdf0){return db[_0x12a0('0x19')][_0x12a0('0x22')]({'where':_0x1eea8c[_0x12a0('0x1b')]?_0x1eea8c['options'][_0x12a0('0x1d')]||null:null})[_0x12a0('0xe')](function(_0x169e22){if(_0x169e22){return _0x169e22[_0x12a0('0x23')](_0x1eea8c[_0x12a0('0x24')]['ids'],_['omit'](_0x1eea8c['body'],[_0x12a0('0x25'),'id'])||{});}})[_0x12a0('0x26')](function(_0x54ee9e){logger[_0x12a0('0xf')](_0x12a0('0x27'),_0x1eea8c);logger[_0x12a0('0x20')](_0x12a0('0x27'),_0x1eea8c,JSON[_0x12a0('0x12')](_0x54ee9e));_0x224e1f(_0x54ee9e);})['catch'](function(_0x51d42f){logger[_0x12a0('0x13')](_0x12a0('0x27'),_0x51d42f[_0x12a0('0x16')],_0x1eea8c);_0x26cdf0(_this[_0x12a0('0x13')](0x1f4,_0x51d42f[_0x12a0('0x16')]));});});};
\ No newline at end of file
+var _0xc233=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','where','attributes','limit','AddTagsToOpenchannelInteraction','find','addTags','ids','omit','spread','AddTags','lodash','util','moment'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xc233,0x1ec));var _0x3c23=function(_0x1305e3,_0x43a724){_0x1305e3=_0x1305e3-0x0;var _0x1068e9=_0xc233[_0x1305e3];return _0x1068e9;};'use strict';var _=require(_0x3c23('0x0'));var util=require(_0x3c23('0x1'));var moment=require(_0x3c23('0x2'));var BPromise=require(_0x3c23('0x3'));var rs=require(_0x3c23('0x4'));var fs=require('fs');var Redis=require(_0x3c23('0x5'));var db=require(_0x3c23('0x6'))['db'];var utils=require(_0x3c23('0x7'));var logger=require(_0x3c23('0x8'))(_0x3c23('0x9'));var config=require(_0x3c23('0xa'));var jayson=require(_0x3c23('0xb'));var client=jayson[_0x3c23('0xc')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x3c23('0xd')],{'host':_0x3c23('0xe'),'port':0x18eb});var socket=require(_0x3c23('0xf'))(new Redis(config['redis']));require(_0x3c23('0x10'))[_0x3c23('0x11')](socket);function respondWithRpcPromise(_0x8ff751,_0x3de2d1,_0x4281cc){return new BPromise(function(_0x4dd5d0,_0x3fd2fe){return client[_0x3c23('0x12')](_0x8ff751,_0x4281cc)[_0x3c23('0x13')](function(_0x1475b5){logger[_0x3c23('0x14')](_0x3c23('0x15'),_0x3de2d1,'request\x20sent');logger[_0x3c23('0x16')](_0x3c23('0x17'),_0x3de2d1,_0x3c23('0x18'),JSON[_0x3c23('0x19')](_0x1475b5));if(_0x1475b5['error']){if(_0x1475b5[_0x3c23('0x1a')][_0x3c23('0x1b')]===0x1f4){logger[_0x3c23('0x1a')]('OpenchannelInteraction,\x20%s,\x20%s',_0x3de2d1,_0x1475b5[_0x3c23('0x1a')]['message']);return _0x3fd2fe(_0x1475b5[_0x3c23('0x1a')][_0x3c23('0x1c')]);}logger[_0x3c23('0x1a')](_0x3c23('0x15'),_0x3de2d1,_0x1475b5[_0x3c23('0x1a')][_0x3c23('0x1c')]);return _0x4dd5d0(_0x1475b5[_0x3c23('0x1a')]['message']);}else{logger[_0x3c23('0x14')]('OpenchannelInteraction,\x20%s,\x20%s',_0x3de2d1,_0x3c23('0x18'));_0x4dd5d0(_0x1475b5['result'][_0x3c23('0x1c')]);}})[_0x3c23('0x1d')](function(_0x296a1c){logger[_0x3c23('0x1a')](_0x3c23('0x15'),_0x3de2d1,_0x296a1c);_0x3fd2fe(_0x296a1c);});});}exports[_0x3c23('0x1e')]=function(_0x3ee09e){var _0x580a4e=this;return new Promise(function(_0x3ee1e8,_0xdebada){return db[_0x3c23('0x1f')][_0x3c23('0x20')](_0x3ee09e[_0x3c23('0x21')],{'raw':_0x3ee09e[_0x3c23('0x22')]?_0x3ee09e[_0x3c23('0x22')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3ee09e[_0x3c23('0x22')]?_0x3ee09e[_0x3c23('0x22')][_0x3c23('0x23')]||null:null,'attributes':_0x3ee09e[_0x3c23('0x22')]?_0x3ee09e[_0x3c23('0x22')][_0x3c23('0x24')]||null:null,'limit':_0x3ee09e[_0x3c23('0x22')]?_0x3ee09e[_0x3c23('0x22')][_0x3c23('0x25')]||null:null})[_0x3c23('0x13')](function(_0x1ccf06){logger[_0x3c23('0x14')](_0x3c23('0x1e'),_0x3ee09e);logger['debug'](_0x3c23('0x1e'),_0x3ee09e,JSON[_0x3c23('0x19')](_0x1ccf06));_0x3ee1e8(_0x1ccf06);})['catch'](function(_0x227841){logger[_0x3c23('0x1a')](_0x3c23('0x1e'),_0x227841[_0x3c23('0x1c')],_0x3ee09e);_0xdebada(_0x580a4e[_0x3c23('0x1a')](0x1f4,_0x227841['message']));});});};exports[_0x3c23('0x26')]=function(_0x3654af){return new Promise(function(_0x37808a,_0x4afe5c){return db[_0x3c23('0x1f')][_0x3c23('0x27')]({'where':_0x3654af[_0x3c23('0x22')]?_0x3654af[_0x3c23('0x22')]['where']||null:null})['then'](function(_0x2462b9){if(_0x2462b9){return _0x2462b9[_0x3c23('0x28')](_0x3654af[_0x3c23('0x21')][_0x3c23('0x29')],_[_0x3c23('0x2a')](_0x3654af[_0x3c23('0x21')],['ids','id'])||{});}})[_0x3c23('0x2b')](function(_0x266e13){logger[_0x3c23('0x14')](_0x3c23('0x2c'),_0x3654af);logger[_0x3c23('0x16')](_0x3c23('0x2c'),_0x3654af,JSON['stringify'](_0x266e13));_0x37808a(_0x266e13);})['catch'](function(_0x77f6f5){logger[_0x3c23('0x1a')](_0x3c23('0x2c'),_0x77f6f5[_0x3c23('0x1c')],_0x3654af);_0x4afe5c(_this[_0x3c23('0x1a')](0x1f4,_0x77f6f5[_0x3c23('0x1c')]));});});};
\ No newline at end of file