Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index 62e6348..c1f7587 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x556b=['OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','UpdateOpenchannelInteraction','update','options','raw','where','attributes','AddTagsToOpenchannelInteraction','find','addTags','body','ids','AddTags','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x695faa,_0x2d55f6){var _0x42a4fa=function(_0x1d0634){while(--_0x1d0634){_0x695faa['push'](_0x695faa['shift']());}};_0x42a4fa(++_0x2d55f6);}(_0x556b,0x8a));var _0xb556=function(_0x266f67,_0x360ca4){_0x266f67=_0x266f67-0x0;var _0x42d604=_0x556b[_0x266f67];return _0x42d604;};'use strict';var _=require(_0xb556('0x0'));var util=require(_0xb556('0x1'));var moment=require(_0xb556('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb556('0x3'));var db=require(_0xb556('0x4'))['db'];var utils=require(_0xb556('0x5'));var logger=require(_0xb556('0x6'))('rpc');var config=require(_0xb556('0x7'));var jayson=require(_0xb556('0x8'));var client=jayson[_0xb556('0x9')][_0xb556('0xa')]({'port':0x232a});config[_0xb556('0xb')]=_[_0xb556('0xc')](config[_0xb556('0xb')],{'host':_0xb556('0xd'),'port':0x18eb});var socket=require(_0xb556('0xe'))(new Redis(config[_0xb556('0xb')]));require('./openchannelInteraction.socket')[_0xb556('0xf')](socket);function respondWithRpcPromise(_0x2ae188,_0x2bff9e,_0x4c782b){return new BPromise(function(_0xa15b62,_0x4853b3){return client[_0xb556('0x10')](_0x2ae188,_0x4c782b)[_0xb556('0x11')](function(_0x349128){logger[_0xb556('0x12')](_0xb556('0x13'),_0x2bff9e,_0xb556('0x14'));logger[_0xb556('0x15')](_0xb556('0x16'),_0x2bff9e,'request\x20sent',JSON[_0xb556('0x17')](_0x349128));if(_0x349128[_0xb556('0x18')]){if(_0x349128[_0xb556('0x18')]['code']===0x1f4){logger[_0xb556('0x18')](_0xb556('0x13'),_0x2bff9e,_0x349128[_0xb556('0x18')][_0xb556('0x19')]);return _0x4853b3(_0x349128[_0xb556('0x18')][_0xb556('0x19')]);}logger[_0xb556('0x18')](_0xb556('0x13'),_0x2bff9e,_0x349128[_0xb556('0x18')][_0xb556('0x19')]);return _0xa15b62(_0x349128[_0xb556('0x18')][_0xb556('0x19')]);}else{logger[_0xb556('0x12')](_0xb556('0x13'),_0x2bff9e,_0xb556('0x14'));_0xa15b62(_0x349128[_0xb556('0x1a')]['message']);}})[_0xb556('0x1b')](function(_0x1e695d){logger[_0xb556('0x18')](_0xb556('0x13'),_0x2bff9e,_0x1e695d);_0x4853b3(_0x1e695d);});});}exports[_0xb556('0x1c')]=function(_0x153789){var _0x4a2e3f=this;return new Promise(function(_0x470829,_0x2d7a21){return db['OpenchannelInteraction'][_0xb556('0x1d')](_0x153789['body'],{'raw':_0x153789[_0xb556('0x1e')]?_0x153789[_0xb556('0x1e')][_0xb556('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x153789[_0xb556('0x1e')]?_0x153789[_0xb556('0x1e')][_0xb556('0x20')]||null:null,'attributes':_0x153789[_0xb556('0x1e')]?_0x153789[_0xb556('0x1e')][_0xb556('0x21')]||null:null,'limit':_0x153789[_0xb556('0x1e')]?_0x153789[_0xb556('0x1e')]['limit']||null:null})['then'](function(_0xad91cf){logger[_0xb556('0x12')]('UpdateOpenchannelInteraction',_0x153789);logger[_0xb556('0x15')](_0xb556('0x1c'),_0x153789,JSON[_0xb556('0x17')](_0xad91cf));_0x470829(_0xad91cf);})[_0xb556('0x1b')](function(_0x52f20c){logger[_0xb556('0x18')](_0xb556('0x1c'),_0x52f20c[_0xb556('0x19')],_0x153789);_0x2d7a21(_0x4a2e3f[_0xb556('0x18')](0x1f4,_0x52f20c[_0xb556('0x19')]));});});};exports[_0xb556('0x22')]=function(_0x279892){return new Promise(function(_0x55e8b9,_0x50391b){return db['OpenchannelInteraction'][_0xb556('0x23')]({'where':_0x279892[_0xb556('0x1e')]?_0x279892[_0xb556('0x1e')]['where']||null:null})[_0xb556('0x11')](function(_0xcaae2e){if(_0xcaae2e){return _0xcaae2e[_0xb556('0x24')](_0x279892['body']['ids'],_['omit'](_0x279892[_0xb556('0x25')],[_0xb556('0x26'),'id'])||{});}})['spread'](function(_0x4fb802){logger[_0xb556('0x12')](_0xb556('0x27'),_0x279892);logger['debug'](_0xb556('0x27'),_0x279892,JSON[_0xb556('0x17')](_0x4fb802));_0x55e8b9(_0x4fb802);})[_0xb556('0x1b')](function(_0x3480c8){logger['error'](_0xb556('0x27'),_0x3480c8[_0xb556('0x19')],_0x279892);_0x50391b(_this[_0xb556('0x18')](0x1f4,_0x3480c8[_0xb556('0x19')]));});});};
\ No newline at end of file
+var _0x00d8=['UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','raw','where','attributes','limit','then','find','addTags','ids','omit','spread','AddTags','lodash','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','defaults','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','register','request','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x94095,_0x4fcedb){var _0x5dcd09=function(_0x30715f){while(--_0x30715f){_0x94095['push'](_0x94095['shift']());}};_0x5dcd09(++_0x4fcedb);}(_0x00d8,0xc0));var _0x800d=function(_0x532dc6,_0x416c5f){_0x532dc6=_0x532dc6-0x0;var _0x1e9c35=_0x00d8[_0x532dc6];return _0x1e9c35;};'use strict';var _=require(_0x800d('0x0'));var util=require('util');var moment=require(_0x800d('0x1'));var BPromise=require(_0x800d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x800d('0x3'))['db'];var utils=require(_0x800d('0x4'));var logger=require(_0x800d('0x5'))(_0x800d('0x6'));var config=require(_0x800d('0x7'));var jayson=require(_0x800d('0x8'));var client=jayson['client'][_0x800d('0x9')]({'port':0x232a});config['redis']=_[_0x800d('0xa')](config[_0x800d('0xb')],{'host':_0x800d('0xc'),'port':0x18eb});var socket=require(_0x800d('0xd'))(new Redis(config[_0x800d('0xb')]));require(_0x800d('0xe'))[_0x800d('0xf')](socket);function respondWithRpcPromise(_0x21f917,_0x1b3277,_0x2faef0){return new BPromise(function(_0x530b69,_0xb8eb14){return client[_0x800d('0x10')](_0x21f917,_0x2faef0)['then'](function(_0x4af404){logger[_0x800d('0x11')](_0x800d('0x12'),_0x1b3277,_0x800d('0x13'));logger[_0x800d('0x14')](_0x800d('0x15'),_0x1b3277,_0x800d('0x13'),JSON[_0x800d('0x16')](_0x4af404));if(_0x4af404[_0x800d('0x17')]){if(_0x4af404[_0x800d('0x17')][_0x800d('0x18')]===0x1f4){logger['error'](_0x800d('0x12'),_0x1b3277,_0x4af404[_0x800d('0x17')][_0x800d('0x19')]);return _0xb8eb14(_0x4af404[_0x800d('0x17')]['message']);}logger['error'](_0x800d('0x12'),_0x1b3277,_0x4af404['error'][_0x800d('0x19')]);return _0x530b69(_0x4af404[_0x800d('0x17')][_0x800d('0x19')]);}else{logger[_0x800d('0x11')](_0x800d('0x12'),_0x1b3277,_0x800d('0x13'));_0x530b69(_0x4af404[_0x800d('0x1a')][_0x800d('0x19')]);}})[_0x800d('0x1b')](function(_0x498419){logger[_0x800d('0x17')](_0x800d('0x12'),_0x1b3277,_0x498419);_0xb8eb14(_0x498419);});});}exports[_0x800d('0x1c')]=function(_0x1828c3){var _0x3e7d84=this;return new Promise(function(_0x174951,_0x3bad6f){return db[_0x800d('0x1d')][_0x800d('0x1e')](_0x1828c3[_0x800d('0x1f')],{'raw':_0x1828c3[_0x800d('0x20')]?_0x1828c3[_0x800d('0x20')][_0x800d('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1828c3['options']?_0x1828c3[_0x800d('0x20')][_0x800d('0x22')]||null:null,'attributes':_0x1828c3[_0x800d('0x20')]?_0x1828c3[_0x800d('0x20')][_0x800d('0x23')]||null:null,'limit':_0x1828c3['options']?_0x1828c3['options'][_0x800d('0x24')]||null:null})[_0x800d('0x25')](function(_0x523c8c){logger[_0x800d('0x11')](_0x800d('0x1c'),_0x1828c3);logger['debug'](_0x800d('0x1c'),_0x1828c3,JSON[_0x800d('0x16')](_0x523c8c));_0x174951(_0x523c8c);})[_0x800d('0x1b')](function(_0x38bc9d){logger['error'](_0x800d('0x1c'),_0x38bc9d[_0x800d('0x19')],_0x1828c3);_0x3bad6f(_0x3e7d84['error'](0x1f4,_0x38bc9d[_0x800d('0x19')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x2203f4){return new Promise(function(_0xa3cffb,_0x25c793){return db[_0x800d('0x1d')][_0x800d('0x26')]({'where':_0x2203f4[_0x800d('0x20')]?_0x2203f4['options']['where']||null:null})[_0x800d('0x25')](function(_0x106f7d){if(_0x106f7d){return _0x106f7d[_0x800d('0x27')](_0x2203f4[_0x800d('0x1f')][_0x800d('0x28')],_[_0x800d('0x29')](_0x2203f4[_0x800d('0x1f')],['ids','id'])||{});}})[_0x800d('0x2a')](function(_0x44920b){logger[_0x800d('0x11')](_0x800d('0x2b'),_0x2203f4);logger['debug'](_0x800d('0x2b'),_0x2203f4,JSON[_0x800d('0x16')](_0x44920b));_0xa3cffb(_0x44920b);})[_0x800d('0x1b')](function(_0x1109f5){logger[_0x800d('0x17')](_0x800d('0x2b'),_0x1109f5[_0x800d('0x19')],_0x2203f4);_0x25c793(_this['error'](0x1f4,_0x1109f5[_0x800d('0x19')]));});});};
\ No newline at end of file