Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index 71490b9..de8c573 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8262=['jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','UpdateOpenchannelInteraction','update','body','options','attributes','limit','AddTagsToOpenchannelInteraction','OpenchannelInteraction','find','where','addTags','ids','omit','spread','AddTags','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger'];(function(_0x57584a,_0x2fdf68){var _0x6a5041=function(_0x254695){while(--_0x254695){_0x57584a['push'](_0x57584a['shift']());}};_0x6a5041(++_0x2fdf68);}(_0x8262,0x9d));var _0x2826=function(_0x2d97ef,_0x51040a){_0x2d97ef=_0x2d97ef-0x0;var _0x572156=_0x8262[_0x2d97ef];return _0x572156;};'use strict';var _=require(_0x2826('0x0'));var util=require(_0x2826('0x1'));var moment=require(_0x2826('0x2'));var BPromise=require(_0x2826('0x3'));var rs=require(_0x2826('0x4'));var fs=require('fs');var Redis=require(_0x2826('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x2826('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x2826('0x7'));var client=jayson[_0x2826('0x8')][_0x2826('0x9')]({'port':0x232a});config[_0x2826('0xa')]=_[_0x2826('0xb')](config[_0x2826('0xa')],{'host':_0x2826('0xc'),'port':0x18eb});var socket=require(_0x2826('0xd'))(new Redis(config[_0x2826('0xa')]));require('./openchannelInteraction.socket')[_0x2826('0xe')](socket);function respondWithRpcPromise(_0x2bda0a,_0x1ca0e0,_0x557d41){return new BPromise(function(_0x2a5f71,_0x415c8b){return client[_0x2826('0xf')](_0x2bda0a,_0x557d41)[_0x2826('0x10')](function(_0x23f048){logger[_0x2826('0x11')](_0x2826('0x12'),_0x1ca0e0,'request\x20sent');logger['debug'](_0x2826('0x13'),_0x1ca0e0,_0x2826('0x14'),JSON[_0x2826('0x15')](_0x23f048));if(_0x23f048[_0x2826('0x16')]){if(_0x23f048[_0x2826('0x16')]['code']===0x1f4){logger[_0x2826('0x16')]('OpenchannelInteraction,\x20%s,\x20%s',_0x1ca0e0,_0x23f048['error'][_0x2826('0x17')]);return _0x415c8b(_0x23f048[_0x2826('0x16')][_0x2826('0x17')]);}logger[_0x2826('0x16')](_0x2826('0x12'),_0x1ca0e0,_0x23f048['error'][_0x2826('0x17')]);return _0x2a5f71(_0x23f048[_0x2826('0x16')][_0x2826('0x17')]);}else{logger[_0x2826('0x11')](_0x2826('0x12'),_0x1ca0e0,_0x2826('0x14'));_0x2a5f71(_0x23f048['result'][_0x2826('0x17')]);}})[_0x2826('0x18')](function(_0x21ee84){logger[_0x2826('0x16')](_0x2826('0x12'),_0x1ca0e0,_0x21ee84);_0x415c8b(_0x21ee84);});});}exports[_0x2826('0x19')]=function(_0x4f8aa2){var _0x131285=this;return new Promise(function(_0x388e3b,_0x749a7d){return db['OpenchannelInteraction'][_0x2826('0x1a')](_0x4f8aa2[_0x2826('0x1b')],{'raw':_0x4f8aa2[_0x2826('0x1c')]?_0x4f8aa2[_0x2826('0x1c')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4f8aa2[_0x2826('0x1c')]?_0x4f8aa2['options']['where']||null:null,'attributes':_0x4f8aa2[_0x2826('0x1c')]?_0x4f8aa2[_0x2826('0x1c')][_0x2826('0x1d')]||null:null,'limit':_0x4f8aa2[_0x2826('0x1c')]?_0x4f8aa2['options'][_0x2826('0x1e')]||null:null})[_0x2826('0x10')](function(_0x154ddc){logger[_0x2826('0x11')](_0x2826('0x19'),_0x4f8aa2);logger['debug'](_0x2826('0x19'),_0x4f8aa2,JSON[_0x2826('0x15')](_0x154ddc));_0x388e3b(_0x154ddc);})['catch'](function(_0x41b958){logger[_0x2826('0x16')](_0x2826('0x19'),_0x41b958[_0x2826('0x17')],_0x4f8aa2);_0x749a7d(_0x131285[_0x2826('0x16')](0x1f4,_0x41b958['message']));});});};exports[_0x2826('0x1f')]=function(_0x1bdd1f){return new Promise(function(_0xf0d3c5,_0x9aa894){return db[_0x2826('0x20')][_0x2826('0x21')]({'where':_0x1bdd1f[_0x2826('0x1c')]?_0x1bdd1f[_0x2826('0x1c')][_0x2826('0x22')]||null:null})[_0x2826('0x10')](function(_0x3c277f){if(_0x3c277f){return _0x3c277f[_0x2826('0x23')](_0x1bdd1f[_0x2826('0x1b')][_0x2826('0x24')],_[_0x2826('0x25')](_0x1bdd1f[_0x2826('0x1b')],['ids','id'])||{});}})[_0x2826('0x26')](function(_0x2af0d0){logger[_0x2826('0x11')](_0x2826('0x27'),_0x1bdd1f);logger[_0x2826('0x28')](_0x2826('0x27'),_0x1bdd1f,JSON[_0x2826('0x15')](_0x2af0d0));_0xf0d3c5(_0x2af0d0);})['catch'](function(_0x136309){logger[_0x2826('0x16')]('AddTags',_0x136309[_0x2826('0x17')],_0x1bdd1f);_0x9aa894(_this['error'](0x1f4,_0x136309[_0x2826('0x17')]));});});};
\ No newline at end of file
+var _0xf857=['client','http','defaults','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','raw','options','where','attributes','limit','AddTagsToOpenchannelInteraction','addTags','ids','omit','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x15f3c0,_0x165a64){var _0x1adfe0=function(_0x212cfc){while(--_0x212cfc){_0x15f3c0['push'](_0x15f3c0['shift']());}};_0x1adfe0(++_0x165a64);}(_0xf857,0x1d8));var _0x7f85=function(_0x1ffe76,_0x552dad){_0x1ffe76=_0x1ffe76-0x0;var _0x17a24e=_0xf857[_0x1ffe76];return _0x17a24e;};'use strict';var _=require(_0x7f85('0x0'));var util=require(_0x7f85('0x1'));var moment=require(_0x7f85('0x2'));var BPromise=require(_0x7f85('0x3'));var rs=require(_0x7f85('0x4'));var fs=require('fs');var Redis=require(_0x7f85('0x5'));var db=require(_0x7f85('0x6'))['db'];var utils=require(_0x7f85('0x7'));var logger=require(_0x7f85('0x8'))(_0x7f85('0x9'));var config=require(_0x7f85('0xa'));var jayson=require(_0x7f85('0xb'));var client=jayson[_0x7f85('0xc')][_0x7f85('0xd')]({'port':0x232a});config['redis']=_[_0x7f85('0xe')](config[_0x7f85('0xf')],{'host':_0x7f85('0x10'),'port':0x18eb});var socket=require(_0x7f85('0x11'))(new Redis(config[_0x7f85('0xf')]));require(_0x7f85('0x12'))['register'](socket);function respondWithRpcPromise(_0x31f2a1,_0x25bc69,_0x38cb06){return new BPromise(function(_0x44c5bc,_0x932477){return client[_0x7f85('0x13')](_0x31f2a1,_0x38cb06)[_0x7f85('0x14')](function(_0x4b694a){logger[_0x7f85('0x15')](_0x7f85('0x16'),_0x25bc69,_0x7f85('0x17'));logger[_0x7f85('0x18')](_0x7f85('0x19'),_0x25bc69,'request\x20sent',JSON[_0x7f85('0x1a')](_0x4b694a));if(_0x4b694a[_0x7f85('0x1b')]){if(_0x4b694a[_0x7f85('0x1b')]['code']===0x1f4){logger['error'](_0x7f85('0x16'),_0x25bc69,_0x4b694a[_0x7f85('0x1b')][_0x7f85('0x1c')]);return _0x932477(_0x4b694a[_0x7f85('0x1b')][_0x7f85('0x1c')]);}logger[_0x7f85('0x1b')]('OpenchannelInteraction,\x20%s,\x20%s',_0x25bc69,_0x4b694a[_0x7f85('0x1b')][_0x7f85('0x1c')]);return _0x44c5bc(_0x4b694a[_0x7f85('0x1b')][_0x7f85('0x1c')]);}else{logger['info'](_0x7f85('0x16'),_0x25bc69,'request\x20sent');_0x44c5bc(_0x4b694a['result']['message']);}})[_0x7f85('0x1d')](function(_0x2b9987){logger[_0x7f85('0x1b')](_0x7f85('0x16'),_0x25bc69,_0x2b9987);_0x932477(_0x2b9987);});});}exports[_0x7f85('0x1e')]=function(_0x194aed){var _0x64764=this;return new Promise(function(_0x236059,_0xc5abb9){return db[_0x7f85('0x1f')][_0x7f85('0x20')](_0x194aed[_0x7f85('0x21')],{'raw':_0x194aed['options']?_0x194aed['options'][_0x7f85('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x194aed[_0x7f85('0x23')]?_0x194aed[_0x7f85('0x23')][_0x7f85('0x24')]||null:null,'attributes':_0x194aed[_0x7f85('0x23')]?_0x194aed['options'][_0x7f85('0x25')]||null:null,'limit':_0x194aed[_0x7f85('0x23')]?_0x194aed['options'][_0x7f85('0x26')]||null:null})[_0x7f85('0x14')](function(_0x189e44){logger[_0x7f85('0x15')](_0x7f85('0x1e'),_0x194aed);logger[_0x7f85('0x18')](_0x7f85('0x1e'),_0x194aed,JSON[_0x7f85('0x1a')](_0x189e44));_0x236059(_0x189e44);})['catch'](function(_0x6e6c37){logger[_0x7f85('0x1b')]('UpdateOpenchannelInteraction',_0x6e6c37[_0x7f85('0x1c')],_0x194aed);_0xc5abb9(_0x64764['error'](0x1f4,_0x6e6c37[_0x7f85('0x1c')]));});});};exports[_0x7f85('0x27')]=function(_0x42f03c){return new Promise(function(_0x1ddf29,_0x2b0806){return db[_0x7f85('0x1f')]['find']({'where':_0x42f03c[_0x7f85('0x23')]?_0x42f03c['options'][_0x7f85('0x24')]||null:null})[_0x7f85('0x14')](function(_0x356933){if(_0x356933){return _0x356933[_0x7f85('0x28')](_0x42f03c[_0x7f85('0x21')][_0x7f85('0x29')],_[_0x7f85('0x2a')](_0x42f03c[_0x7f85('0x21')],[_0x7f85('0x29'),'id'])||{});}})['spread'](function(_0x52ddbf){logger[_0x7f85('0x15')](_0x7f85('0x2b'),_0x42f03c);logger[_0x7f85('0x18')](_0x7f85('0x2b'),_0x42f03c,JSON['stringify'](_0x52ddbf));_0x1ddf29(_0x52ddbf);})[_0x7f85('0x1d')](function(_0x1400f5){logger[_0x7f85('0x1b')](_0x7f85('0x2b'),_0x1400f5[_0x7f85('0x1c')],_0x42f03c);_0x2b0806(_this[_0x7f85('0x1b')](0x1f4,_0x1400f5[_0x7f85('0x1c')]));});});};
\ No newline at end of file