Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index de8c573..ef10bf4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x3e68=['register','request','then','request\x20sent','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','OpenchannelInteraction,\x20%s,\x20%s','info','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','raw','attributes','AddTagsToOpenchannelInteraction','where','addTags','ids','spread','AddTags','debug','util','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelInteraction.socket'];(function(_0x4a462e,_0x37c629){var _0x4c88c6=function(_0x2e9d0d){while(--_0x2e9d0d){_0x4a462e['push'](_0x4a462e['shift']());}};_0x4c88c6(++_0x37c629);}(_0x3e68,0x15a));var _0x83e6=function(_0x1a6277,_0x308c41){_0x1a6277=_0x1a6277-0x0;var _0x55cb62=_0x3e68[_0x1a6277];return _0x55cb62;};'use strict';var _=require('lodash');var util=require(_0x83e6('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x83e6('0x1'));var fs=require('fs');var Redis=require(_0x83e6('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x83e6('0x3'));var logger=require(_0x83e6('0x4'))('rpc');var config=require(_0x83e6('0x5'));var jayson=require(_0x83e6('0x6'));var client=jayson[_0x83e6('0x7')][_0x83e6('0x8')]({'port':0x232a});config[_0x83e6('0x9')]=_[_0x83e6('0xa')](config[_0x83e6('0x9')],{'host':_0x83e6('0xb'),'port':0x18eb});var socket=require(_0x83e6('0xc'))(new Redis(config[_0x83e6('0x9')]));require(_0x83e6('0xd'))[_0x83e6('0xe')](socket);function respondWithRpcPromise(_0x34079c,_0x462500,_0x48e8f1){return new BPromise(function(_0x3613b4,_0x3b5b8b){return client[_0x83e6('0xf')](_0x34079c,_0x48e8f1)[_0x83e6('0x10')](function(_0x4c9be2){logger['info']('OpenchannelInteraction,\x20%s,\x20%s',_0x462500,_0x83e6('0x11'));logger['debug'](_0x83e6('0x12'),_0x462500,_0x83e6('0x11'),JSON[_0x83e6('0x13')](_0x4c9be2));if(_0x4c9be2[_0x83e6('0x14')]){if(_0x4c9be2[_0x83e6('0x14')][_0x83e6('0x15')]===0x1f4){logger['error']('OpenchannelInteraction,\x20%s,\x20%s',_0x462500,_0x4c9be2[_0x83e6('0x14')][_0x83e6('0x16')]);return _0x3b5b8b(_0x4c9be2[_0x83e6('0x14')][_0x83e6('0x16')]);}logger[_0x83e6('0x14')](_0x83e6('0x17'),_0x462500,_0x4c9be2['error'][_0x83e6('0x16')]);return _0x3613b4(_0x4c9be2[_0x83e6('0x14')][_0x83e6('0x16')]);}else{logger[_0x83e6('0x18')](_0x83e6('0x17'),_0x462500,'request\x20sent');_0x3613b4(_0x4c9be2['result'][_0x83e6('0x16')]);}})[_0x83e6('0x19')](function(_0xe02485){logger[_0x83e6('0x14')](_0x83e6('0x17'),_0x462500,_0xe02485);_0x3b5b8b(_0xe02485);});});}exports[_0x83e6('0x1a')]=function(_0x11c3fc){var _0x24a24f=this;return new Promise(function(_0x58f79e,_0xc38e55){return db[_0x83e6('0x1b')][_0x83e6('0x1c')](_0x11c3fc[_0x83e6('0x1d')],{'raw':_0x11c3fc[_0x83e6('0x1e')]?_0x11c3fc[_0x83e6('0x1e')][_0x83e6('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x11c3fc[_0x83e6('0x1e')]?_0x11c3fc[_0x83e6('0x1e')]['where']||null:null,'attributes':_0x11c3fc['options']?_0x11c3fc[_0x83e6('0x1e')][_0x83e6('0x20')]||null:null,'limit':_0x11c3fc['options']?_0x11c3fc[_0x83e6('0x1e')]['limit']||null:null})[_0x83e6('0x10')](function(_0x3e641b){logger[_0x83e6('0x18')](_0x83e6('0x1a'),_0x11c3fc);logger['debug']('UpdateOpenchannelInteraction',_0x11c3fc,JSON[_0x83e6('0x13')](_0x3e641b));_0x58f79e(_0x3e641b);})[_0x83e6('0x19')](function(_0x527f59){logger[_0x83e6('0x14')]('UpdateOpenchannelInteraction',_0x527f59['message'],_0x11c3fc);_0xc38e55(_0x24a24f[_0x83e6('0x14')](0x1f4,_0x527f59[_0x83e6('0x16')]));});});};exports[_0x83e6('0x21')]=function(_0x553464){return new Promise(function(_0x51c172,_0x424c66){return db['OpenchannelInteraction']['find']({'where':_0x553464[_0x83e6('0x1e')]?_0x553464[_0x83e6('0x1e')][_0x83e6('0x22')]||null:null})[_0x83e6('0x10')](function(_0x4fee2e){if(_0x4fee2e){return _0x4fee2e[_0x83e6('0x23')](_0x553464[_0x83e6('0x1d')]['ids'],_['omit'](_0x553464[_0x83e6('0x1d')],[_0x83e6('0x24'),'id'])||{});}})[_0x83e6('0x25')](function(_0x1c2c27){logger[_0x83e6('0x18')](_0x83e6('0x26'),_0x553464);logger[_0x83e6('0x27')](_0x83e6('0x26'),_0x553464,JSON[_0x83e6('0x13')](_0x1c2c27));_0x51c172(_0x1c2c27);})[_0x83e6('0x19')](function(_0x3f71b2){logger['error'](_0x83e6('0x26'),_0x3f71b2[_0x83e6('0x16')],_0x553464);_0x424c66(_this[_0x83e6('0x14')](0x1f4,_0x3f71b2[_0x83e6('0x16')]));});});};
\ No newline at end of file