Built motion from commit 3d3e98f2.|2.6.29
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index 5eff983..fbf3b7a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x88a6=['stringify','error','code','message','result','catch','OpenchannelInteraction','body','options','raw','where','attributes','limit','then','UpdateOpenchannelInteraction','AddTagsToOpenchannelInteraction','find','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','client','http','redis','defaults','request','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s'];(function(_0x43f3ba,_0x2393a9){var _0x160675=function(_0x2fa01f){while(--_0x2fa01f){_0x43f3ba['push'](_0x43f3ba['shift']());}};_0x160675(++_0x2393a9);}(_0x88a6,0x12e));var _0x688a=function(_0x411c23,_0x5503ae){_0x411c23=_0x411c23-0x0;var _0x27fab6=_0x88a6[_0x411c23];return _0x27fab6;};'use strict';var _=require(_0x688a('0x0'));var util=require(_0x688a('0x1'));var moment=require(_0x688a('0x2'));var BPromise=require(_0x688a('0x3'));var rs=require(_0x688a('0x4'));var fs=require('fs');var Redis=require(_0x688a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x688a('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x688a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x688a('0x8')][_0x688a('0x9')]({'port':0x232a});config[_0x688a('0xa')]=_[_0x688a('0xb')](config[_0x688a('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./openchannelInteraction.socket')['register'](socket);function respondWithRpcPromise(_0x2c9aa9,_0x759be4,_0x1ca557){return new BPromise(function(_0x37e591,_0x2e7599){return client[_0x688a('0xc')](_0x2c9aa9,_0x1ca557)['then'](function(_0x5592fd){logger[_0x688a('0xd')](_0x688a('0xe'),_0x759be4,_0x688a('0xf'));logger[_0x688a('0x10')](_0x688a('0x11'),_0x759be4,'request\x20sent',JSON[_0x688a('0x12')](_0x5592fd));if(_0x5592fd[_0x688a('0x13')]){if(_0x5592fd[_0x688a('0x13')][_0x688a('0x14')]===0x1f4){logger[_0x688a('0x13')](_0x688a('0xe'),_0x759be4,_0x5592fd['error'][_0x688a('0x15')]);return _0x2e7599(_0x5592fd[_0x688a('0x13')][_0x688a('0x15')]);}logger[_0x688a('0x13')](_0x688a('0xe'),_0x759be4,_0x5592fd[_0x688a('0x13')][_0x688a('0x15')]);return _0x37e591(_0x5592fd['error'][_0x688a('0x15')]);}else{logger[_0x688a('0xd')](_0x688a('0xe'),_0x759be4,_0x688a('0xf'));_0x37e591(_0x5592fd[_0x688a('0x16')][_0x688a('0x15')]);}})[_0x688a('0x17')](function(_0x311584){logger[_0x688a('0x13')](_0x688a('0xe'),_0x759be4,_0x311584);_0x2e7599(_0x311584);});});}exports['UpdateOpenchannelInteraction']=function(_0x11d3e7){var _0x338e73=this;return new Promise(function(_0xbb851c,_0x4ede4e){return db[_0x688a('0x18')]['update'](_0x11d3e7[_0x688a('0x19')],{'raw':_0x11d3e7[_0x688a('0x1a')]?_0x11d3e7['options'][_0x688a('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x11d3e7[_0x688a('0x1a')]?_0x11d3e7[_0x688a('0x1a')][_0x688a('0x1c')]||null:null,'attributes':_0x11d3e7[_0x688a('0x1a')]?_0x11d3e7['options'][_0x688a('0x1d')]||null:null,'limit':_0x11d3e7[_0x688a('0x1a')]?_0x11d3e7['options'][_0x688a('0x1e')]||null:null})[_0x688a('0x1f')](function(_0x4f8c6c){logger[_0x688a('0xd')]('UpdateOpenchannelInteraction',_0x11d3e7);logger[_0x688a('0x10')](_0x688a('0x20'),_0x11d3e7,JSON['stringify'](_0x4f8c6c));_0xbb851c(_0x4f8c6c);})[_0x688a('0x17')](function(_0x244e59){logger[_0x688a('0x13')](_0x688a('0x20'),_0x244e59['message'],_0x11d3e7);_0x4ede4e(_0x338e73[_0x688a('0x13')](0x1f4,_0x244e59['message']));});});};exports[_0x688a('0x21')]=function(_0xc1896e){return new Promise(function(_0x4e8cb2,_0x1d067a){return db[_0x688a('0x18')][_0x688a('0x22')]({'where':_0xc1896e['options']?_0xc1896e[_0x688a('0x1a')]['where']||null:null})[_0x688a('0x1f')](function(_0x444ab6){if(_0x444ab6){return _0x444ab6[_0x688a('0x23')](_0xc1896e['body'][_0x688a('0x24')],_[_0x688a('0x25')](_0xc1896e[_0x688a('0x19')],[_0x688a('0x24'),'id'])||{});}})[_0x688a('0x26')](function(_0x366de2){logger[_0x688a('0xd')](_0x688a('0x27'),_0xc1896e);logger[_0x688a('0x10')](_0x688a('0x27'),_0xc1896e,JSON[_0x688a('0x12')](_0x366de2));_0x4e8cb2(_0x366de2);})['catch'](function(_0x40a13c){logger['error'](_0x688a('0x27'),_0x40a13c[_0x688a('0x15')],_0xc1896e);_0x1d067a(_this[_0x688a('0x13')](0x1f4,_0x40a13c[_0x688a('0x15')]));});});};
\ No newline at end of file
+var _0x769a=['http','redis','localhost','./openchannelInteraction.socket','register','request','info','request\x20sent','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelInteraction,\x20%s,\x20%s','message','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','attributes','limit','then','debug','find','where','addTags','ids','omit','spread','AddTags','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x235f7c,_0x1782b2){var _0x172576=function(_0x376a13){while(--_0x376a13){_0x235f7c['push'](_0x235f7c['shift']());}};_0x172576(++_0x1782b2);}(_0x769a,0x76));var _0xa769=function(_0x10d670,_0x178996){_0x10d670=_0x10d670-0x0;var _0x20d6f8=_0x769a[_0x10d670];return _0x20d6f8;};'use strict';var _=require(_0xa769('0x0'));var util=require('util');var moment=require(_0xa769('0x1'));var BPromise=require(_0xa769('0x2'));var rs=require(_0xa769('0x3'));var fs=require('fs');var Redis=require(_0xa769('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa769('0x5'));var logger=require(_0xa769('0x6'))(_0xa769('0x7'));var config=require(_0xa769('0x8'));var jayson=require(_0xa769('0x9'));var client=jayson[_0xa769('0xa')][_0xa769('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0xa769('0xc')],{'host':_0xa769('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa769('0xc')]));require(_0xa769('0xe'))[_0xa769('0xf')](socket);function respondWithRpcPromise(_0x16bd77,_0x41e716,_0x580137){return new BPromise(function(_0x564460,_0x4bd8ee){return client[_0xa769('0x10')](_0x16bd77,_0x580137)['then'](function(_0x286900){logger[_0xa769('0x11')]('OpenchannelInteraction,\x20%s,\x20%s',_0x41e716,_0xa769('0x12'));logger['debug'](_0xa769('0x13'),_0x41e716,_0xa769('0x12'),JSON[_0xa769('0x14')](_0x286900));if(_0x286900[_0xa769('0x15')]){if(_0x286900[_0xa769('0x15')][_0xa769('0x16')]===0x1f4){logger[_0xa769('0x15')](_0xa769('0x17'),_0x41e716,_0x286900[_0xa769('0x15')]['message']);return _0x4bd8ee(_0x286900[_0xa769('0x15')][_0xa769('0x18')]);}logger[_0xa769('0x15')](_0xa769('0x17'),_0x41e716,_0x286900[_0xa769('0x15')][_0xa769('0x18')]);return _0x564460(_0x286900['error']['message']);}else{logger[_0xa769('0x11')](_0xa769('0x17'),_0x41e716,_0xa769('0x12'));_0x564460(_0x286900[_0xa769('0x19')][_0xa769('0x18')]);}})[_0xa769('0x1a')](function(_0x436705){logger[_0xa769('0x15')]('OpenchannelInteraction,\x20%s,\x20%s',_0x41e716,_0x436705);_0x4bd8ee(_0x436705);});});}exports[_0xa769('0x1b')]=function(_0x1bc695){var _0x45a616=this;return new Promise(function(_0xe18dd9,_0x2b14d3){return db[_0xa769('0x1c')][_0xa769('0x1d')](_0x1bc695[_0xa769('0x1e')],{'raw':_0x1bc695[_0xa769('0x1f')]?_0x1bc695['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1bc695[_0xa769('0x1f')]?_0x1bc695[_0xa769('0x1f')]['where']||null:null,'attributes':_0x1bc695[_0xa769('0x1f')]?_0x1bc695['options'][_0xa769('0x20')]||null:null,'limit':_0x1bc695[_0xa769('0x1f')]?_0x1bc695['options'][_0xa769('0x21')]||null:null})[_0xa769('0x22')](function(_0x1fd510){logger['info'](_0xa769('0x1b'),_0x1bc695);logger[_0xa769('0x23')](_0xa769('0x1b'),_0x1bc695,JSON['stringify'](_0x1fd510));_0xe18dd9(_0x1fd510);})[_0xa769('0x1a')](function(_0x8bc257){logger[_0xa769('0x15')](_0xa769('0x1b'),_0x8bc257[_0xa769('0x18')],_0x1bc695);_0x2b14d3(_0x45a616[_0xa769('0x15')](0x1f4,_0x8bc257[_0xa769('0x18')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x42e4e5){return new Promise(function(_0x281eba,_0x59fa12){return db[_0xa769('0x1c')][_0xa769('0x24')]({'where':_0x42e4e5[_0xa769('0x1f')]?_0x42e4e5[_0xa769('0x1f')][_0xa769('0x25')]||null:null})[_0xa769('0x22')](function(_0x92313b){if(_0x92313b){return _0x92313b[_0xa769('0x26')](_0x42e4e5[_0xa769('0x1e')][_0xa769('0x27')],_[_0xa769('0x28')](_0x42e4e5[_0xa769('0x1e')],[_0xa769('0x27'),'id'])||{});}})[_0xa769('0x29')](function(_0x3d82eb){logger['info'](_0xa769('0x2a'),_0x42e4e5);logger['debug'](_0xa769('0x2a'),_0x42e4e5,JSON['stringify'](_0x3d82eb));_0x281eba(_0x3d82eb);})[_0xa769('0x1a')](function(_0x3dadc2){logger[_0xa769('0x15')]('AddTags',_0x3dadc2[_0xa769('0x18')],_0x42e4e5);_0x59fa12(_this[_0xa769('0x15')](0x1f4,_0x3dadc2['message']));});});};
\ No newline at end of file