Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index 1760593..383897d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbff5=['../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','then','info','OpenchannelInteraction,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','raw','where','attributes','limit','AddTagsToOpenchannelInteraction','addTags','ids','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x36c6eb,_0x4fb127){var _0x30675b=function(_0x3a788b){while(--_0x3a788b){_0x36c6eb['push'](_0x36c6eb['shift']());}};_0x30675b(++_0x4fb127);}(_0xbff5,0x1bc));var _0x5bff=function(_0x6ecbc7,_0x595c83){_0x6ecbc7=_0x6ecbc7-0x0;var _0x4e9ac7=_0xbff5[_0x6ecbc7];return _0x4e9ac7;};'use strict';var _=require(_0x5bff('0x0'));var util=require(_0x5bff('0x1'));var moment=require(_0x5bff('0x2'));var BPromise=require(_0x5bff('0x3'));var rs=require(_0x5bff('0x4'));var fs=require('fs');var Redis=require(_0x5bff('0x5'));var db=require(_0x5bff('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x5bff('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x5bff('0x8'));var client=jayson[_0x5bff('0x9')][_0x5bff('0xa')]({'port':0x232a});config[_0x5bff('0xb')]=_[_0x5bff('0xc')](config[_0x5bff('0xb')],{'host':_0x5bff('0xd'),'port':0x18eb});var socket=require(_0x5bff('0xe'))(new Redis(config[_0x5bff('0xb')]));require('./openchannelInteraction.socket')[_0x5bff('0xf')](socket);function respondWithRpcPromise(_0x5e7d10,_0x1d8197,_0x40b806){return new BPromise(function(_0x4fc146,_0x3e72e9){return client['request'](_0x5e7d10,_0x40b806)[_0x5bff('0x10')](function(_0x4ff164){logger[_0x5bff('0x11')](_0x5bff('0x12'),_0x1d8197,'request\x20sent');logger[_0x5bff('0x13')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0x1d8197,_0x5bff('0x14'),JSON[_0x5bff('0x15')](_0x4ff164));if(_0x4ff164['error']){if(_0x4ff164[_0x5bff('0x16')][_0x5bff('0x17')]===0x1f4){logger['error']('OpenchannelInteraction,\x20%s,\x20%s',_0x1d8197,_0x4ff164[_0x5bff('0x16')][_0x5bff('0x18')]);return _0x3e72e9(_0x4ff164[_0x5bff('0x16')]['message']);}logger[_0x5bff('0x16')](_0x5bff('0x12'),_0x1d8197,_0x4ff164[_0x5bff('0x16')]['message']);return _0x4fc146(_0x4ff164[_0x5bff('0x16')][_0x5bff('0x18')]);}else{logger[_0x5bff('0x11')]('OpenchannelInteraction,\x20%s,\x20%s',_0x1d8197,_0x5bff('0x14'));_0x4fc146(_0x4ff164[_0x5bff('0x19')][_0x5bff('0x18')]);}})[_0x5bff('0x1a')](function(_0x5216dc){logger[_0x5bff('0x16')]('OpenchannelInteraction,\x20%s,\x20%s',_0x1d8197,_0x5216dc);_0x3e72e9(_0x5216dc);});});}exports[_0x5bff('0x1b')]=function(_0x4d0111){var _0x1fc4cf=this;return new Promise(function(_0x13d5d0,_0x2a83ce){return db[_0x5bff('0x1c')][_0x5bff('0x1d')](_0x4d0111[_0x5bff('0x1e')],{'raw':_0x4d0111[_0x5bff('0x1f')]?_0x4d0111[_0x5bff('0x1f')][_0x5bff('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4d0111['options']?_0x4d0111[_0x5bff('0x1f')][_0x5bff('0x21')]||null:null,'attributes':_0x4d0111[_0x5bff('0x1f')]?_0x4d0111[_0x5bff('0x1f')][_0x5bff('0x22')]||null:null,'limit':_0x4d0111[_0x5bff('0x1f')]?_0x4d0111[_0x5bff('0x1f')][_0x5bff('0x23')]||null:null})['then'](function(_0x5741d9){logger[_0x5bff('0x11')]('UpdateOpenchannelInteraction',_0x4d0111);logger[_0x5bff('0x13')](_0x5bff('0x1b'),_0x4d0111,JSON[_0x5bff('0x15')](_0x5741d9));_0x13d5d0(_0x5741d9);})[_0x5bff('0x1a')](function(_0xfa361d){logger[_0x5bff('0x16')](_0x5bff('0x1b'),_0xfa361d[_0x5bff('0x18')],_0x4d0111);_0x2a83ce(_0x1fc4cf['error'](0x1f4,_0xfa361d['message']));});});};exports[_0x5bff('0x24')]=function(_0x2dd52f){return new Promise(function(_0x4d7640,_0x36a7d2){return db['OpenchannelInteraction']['find']({'where':_0x2dd52f[_0x5bff('0x1f')]?_0x2dd52f['options'][_0x5bff('0x21')]||null:null})[_0x5bff('0x10')](function(_0x2d692a){if(_0x2d692a){return _0x2d692a[_0x5bff('0x25')](_0x2dd52f['body'][_0x5bff('0x26')],_['omit'](_0x2dd52f[_0x5bff('0x1e')],['ids','id'])||{});}})[_0x5bff('0x27')](function(_0x100d0c){logger[_0x5bff('0x11')](_0x5bff('0x28'),_0x2dd52f);logger[_0x5bff('0x13')](_0x5bff('0x28'),_0x2dd52f,JSON['stringify'](_0x100d0c));_0x4d7640(_0x100d0c);})[_0x5bff('0x1a')](function(_0x31c33f){logger[_0x5bff('0x16')](_0x5bff('0x28'),_0x31c33f[_0x5bff('0x18')],_0x2dd52f);_0x36a7d2(_this[_0x5bff('0x16')](0x1f4,_0x31c33f[_0x5bff('0x18')]));});});};
\ No newline at end of file
+var _0xf072=['AddTags','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelInteraction.socket','register','request','then','request\x20sent','debug','stringify','error','code','OpenchannelInteraction,\x20%s,\x20%s','message','info','result','catch','UpdateOpenchannelInteraction','options','raw','where','limit','AddTagsToOpenchannelInteraction','OpenchannelInteraction','find','body','ids','omit','spread'];(function(_0xce6f11,_0x3c3137){var _0x35b709=function(_0x1755c6){while(--_0x1755c6){_0xce6f11['push'](_0xce6f11['shift']());}};_0x35b709(++_0x3c3137);}(_0xf072,0x1cf));var _0x2f07=function(_0x2b6e31,_0x434945){_0x2b6e31=_0x2b6e31-0x0;var _0x205978=_0xf072[_0x2b6e31];return _0x205978;};'use strict';var _=require(_0x2f07('0x0'));var util=require(_0x2f07('0x1'));var moment=require(_0x2f07('0x2'));var BPromise=require('bluebird');var rs=require(_0x2f07('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2f07('0x4'))['db'];var utils=require(_0x2f07('0x5'));var logger=require(_0x2f07('0x6'))('rpc');var config=require(_0x2f07('0x7'));var jayson=require(_0x2f07('0x8'));var client=jayson[_0x2f07('0x9')][_0x2f07('0xa')]({'port':0x232a});config[_0x2f07('0xb')]=_[_0x2f07('0xc')](config[_0x2f07('0xb')],{'host':_0x2f07('0xd'),'port':0x18eb});var socket=require(_0x2f07('0xe'))(new Redis(config[_0x2f07('0xb')]));require(_0x2f07('0xf'))[_0x2f07('0x10')](socket);function respondWithRpcPromise(_0x1a3848,_0x18fe13,_0x14e237){return new BPromise(function(_0x564260,_0xdb2783){return client[_0x2f07('0x11')](_0x1a3848,_0x14e237)[_0x2f07('0x12')](function(_0x3525be){logger['info']('OpenchannelInteraction,\x20%s,\x20%s',_0x18fe13,_0x2f07('0x13'));logger[_0x2f07('0x14')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0x18fe13,_0x2f07('0x13'),JSON[_0x2f07('0x15')](_0x3525be));if(_0x3525be[_0x2f07('0x16')]){if(_0x3525be['error'][_0x2f07('0x17')]===0x1f4){logger[_0x2f07('0x16')](_0x2f07('0x18'),_0x18fe13,_0x3525be[_0x2f07('0x16')][_0x2f07('0x19')]);return _0xdb2783(_0x3525be[_0x2f07('0x16')]['message']);}logger[_0x2f07('0x16')]('OpenchannelInteraction,\x20%s,\x20%s',_0x18fe13,_0x3525be[_0x2f07('0x16')][_0x2f07('0x19')]);return _0x564260(_0x3525be[_0x2f07('0x16')][_0x2f07('0x19')]);}else{logger[_0x2f07('0x1a')](_0x2f07('0x18'),_0x18fe13,_0x2f07('0x13'));_0x564260(_0x3525be[_0x2f07('0x1b')]['message']);}})[_0x2f07('0x1c')](function(_0x4e35fd){logger[_0x2f07('0x16')](_0x2f07('0x18'),_0x18fe13,_0x4e35fd);_0xdb2783(_0x4e35fd);});});}exports[_0x2f07('0x1d')]=function(_0xd944d6){var _0x2ef47d=this;return new Promise(function(_0x5267e1,_0x45df73){return db['OpenchannelInteraction']['update'](_0xd944d6['body'],{'raw':_0xd944d6[_0x2f07('0x1e')]?_0xd944d6['options'][_0x2f07('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xd944d6['options']?_0xd944d6[_0x2f07('0x1e')][_0x2f07('0x20')]||null:null,'attributes':_0xd944d6[_0x2f07('0x1e')]?_0xd944d6[_0x2f07('0x1e')]['attributes']||null:null,'limit':_0xd944d6[_0x2f07('0x1e')]?_0xd944d6[_0x2f07('0x1e')][_0x2f07('0x21')]||null:null})['then'](function(_0x111376){logger[_0x2f07('0x1a')]('UpdateOpenchannelInteraction',_0xd944d6);logger[_0x2f07('0x14')](_0x2f07('0x1d'),_0xd944d6,JSON['stringify'](_0x111376));_0x5267e1(_0x111376);})[_0x2f07('0x1c')](function(_0x562335){logger[_0x2f07('0x16')](_0x2f07('0x1d'),_0x562335[_0x2f07('0x19')],_0xd944d6);_0x45df73(_0x2ef47d[_0x2f07('0x16')](0x1f4,_0x562335[_0x2f07('0x19')]));});});};exports[_0x2f07('0x22')]=function(_0x787aad){return new Promise(function(_0xfc52cf,_0x3d7fff){return db[_0x2f07('0x23')][_0x2f07('0x24')]({'where':_0x787aad[_0x2f07('0x1e')]?_0x787aad['options'][_0x2f07('0x20')]||null:null})[_0x2f07('0x12')](function(_0xada137){if(_0xada137){return _0xada137['addTags'](_0x787aad[_0x2f07('0x25')][_0x2f07('0x26')],_[_0x2f07('0x27')](_0x787aad['body'],[_0x2f07('0x26'),'id'])||{});}})[_0x2f07('0x28')](function(_0xee6a27){logger[_0x2f07('0x1a')](_0x2f07('0x29'),_0x787aad);logger[_0x2f07('0x14')](_0x2f07('0x29'),_0x787aad,JSON['stringify'](_0xee6a27));_0xfc52cf(_0xee6a27);})[_0x2f07('0x1c')](function(_0x5b0407){logger[_0x2f07('0x16')](_0x2f07('0x29'),_0x5b0407[_0x2f07('0x19')],_0x787aad);_0x3d7fff(_this[_0x2f07('0x16')](0x1f4,_0x5b0407[_0x2f07('0x19')]));});});};
\ No newline at end of file