Built motion from commit (unavailable).|2.4.3
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
index e0efb74..e6929c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ca=['debug','stringify','error','code','message','result','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','raw','attributes','then','find','addTags','omit','ids','catch','AddTags','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','register','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0xf2ca,0x16a));var _0xaf2c=function(_0x31c5e9,_0x30e373){_0x31c5e9=_0x31c5e9-0x0;var _0x517a8d=_0xf2ca[_0x31c5e9];return _0x517a8d;};'use strict';var _=require(_0xaf2c('0x0'));var util=require(_0xaf2c('0x1'));var moment=require(_0xaf2c('0x2'));var BPromise=require('bluebird');var rs=require(_0xaf2c('0x3'));var fs=require('fs');var Redis=require(_0xaf2c('0x4'));var db=require(_0xaf2c('0x5'))['db'];var utils=require(_0xaf2c('0x6'));var logger=require(_0xaf2c('0x7'))(_0xaf2c('0x8'));var config=require('../../config/environment');var jayson=require(_0xaf2c('0x9'));var client=jayson[_0xaf2c('0xa')][_0xaf2c('0xb')]({'port':0x232a});config[_0xaf2c('0xc')]=_['defaults'](config[_0xaf2c('0xc')],{'host':_0xaf2c('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xaf2c('0xc')]));require('./openchannelInteraction.socket')[_0xaf2c('0xe')](socket);function respondWithRpcPromise(_0x4a0064,_0x2f5099,_0x144a7a){return new BPromise(function(_0x2e04e5,_0xd891e9){return client['request'](_0x4a0064,_0x144a7a)['then'](function(_0x2c0d88){logger[_0xaf2c('0xf')](_0xaf2c('0x10'),_0x2f5099,_0xaf2c('0x11'));logger[_0xaf2c('0x12')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0x2f5099,'request\x20sent',JSON[_0xaf2c('0x13')](_0x2c0d88));if(_0x2c0d88[_0xaf2c('0x14')]){if(_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x15')]===0x1f4){logger[_0xaf2c('0x14')](_0xaf2c('0x10'),_0x2f5099,_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x16')]);return _0xd891e9(_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x16')]);}logger[_0xaf2c('0x14')](_0xaf2c('0x10'),_0x2f5099,_0x2c0d88[_0xaf2c('0x14')][_0xaf2c('0x16')]);return _0x2e04e5(_0x2c0d88[_0xaf2c('0x14')]['message']);}else{logger[_0xaf2c('0xf')]('OpenchannelInteraction,\x20%s,\x20%s',_0x2f5099,_0xaf2c('0x11'));_0x2e04e5(_0x2c0d88[_0xaf2c('0x17')][_0xaf2c('0x16')]);}})['catch'](function(_0x28ae7b){logger[_0xaf2c('0x14')](_0xaf2c('0x10'),_0x2f5099,_0x28ae7b);_0xd891e9(_0x28ae7b);});});}exports[_0xaf2c('0x18')]=function(_0x3f977c){var _0x1b7f07=this;return new Promise(function(_0x531609,_0x35e712){return db[_0xaf2c('0x19')][_0xaf2c('0x1a')](_0x3f977c[_0xaf2c('0x1b')],{'raw':_0x3f977c[_0xaf2c('0x1c')]?_0x3f977c['options'][_0xaf2c('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f977c[_0xaf2c('0x1c')]?_0x3f977c[_0xaf2c('0x1c')]['where']||null:null,'attributes':_0x3f977c['options']?_0x3f977c[_0xaf2c('0x1c')][_0xaf2c('0x1e')]||null:null,'limit':_0x3f977c[_0xaf2c('0x1c')]?_0x3f977c[_0xaf2c('0x1c')]['limit']||null:null})[_0xaf2c('0x1f')](function(_0xf1a7cf){logger[_0xaf2c('0xf')](_0xaf2c('0x18'),_0x3f977c);logger[_0xaf2c('0x12')](_0xaf2c('0x18'),_0x3f977c,JSON[_0xaf2c('0x13')](_0xf1a7cf));_0x531609(_0xf1a7cf);})['catch'](function(_0x29f8b0){logger[_0xaf2c('0x14')](_0xaf2c('0x18'),_0x29f8b0[_0xaf2c('0x16')],_0x3f977c);_0x35e712(_0x1b7f07['error'](0x1f4,_0x29f8b0[_0xaf2c('0x16')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x38db1b){return new Promise(function(_0x42f980,_0x15466b){return db['OpenchannelInteraction'][_0xaf2c('0x20')]({'where':_0x38db1b[_0xaf2c('0x1c')]?_0x38db1b[_0xaf2c('0x1c')]['where']||null:null})[_0xaf2c('0x1f')](function(_0x32d95c){if(_0x32d95c){return _0x32d95c[_0xaf2c('0x21')](_0x38db1b[_0xaf2c('0x1b')]['ids'],_[_0xaf2c('0x22')](_0x38db1b[_0xaf2c('0x1b')],[_0xaf2c('0x23'),'id'])||{});}})['spread'](function(_0x52dd8b){logger[_0xaf2c('0xf')]('AddTags',_0x38db1b);logger[_0xaf2c('0x12')]('AddTags',_0x38db1b,JSON[_0xaf2c('0x13')](_0x52dd8b));_0x42f980(_0x52dd8b);})[_0xaf2c('0x24')](function(_0x4ffbb9){logger[_0xaf2c('0x14')](_0xaf2c('0x25'),_0x4ffbb9['message'],_0x38db1b);_0x15466b(_this[_0xaf2c('0x14')](0x1f4,_0x4ffbb9[_0xaf2c('0x16')]));});});};
\ No newline at end of file
+var _0x6455=['message','info','result','catch','OpenchannelInteraction','body','raw','options','where','attributes','limit','UpdateOpenchannelInteraction','AddTagsToOpenchannelInteraction','find','addTags','ids','omit','spread','AddTags','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','./openchannelInteraction.socket','register','request','then','OpenchannelInteraction,\x20%s,\x20%s','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x2e612a,_0x106dd7){var _0x3cb97c=function(_0x367d2f){while(--_0x367d2f){_0x2e612a['push'](_0x2e612a['shift']());}};_0x3cb97c(++_0x106dd7);}(_0x6455,0x97));var _0x5645=function(_0x350e44,_0x16fba3){_0x350e44=_0x350e44-0x0;var _0x586844=_0x6455[_0x350e44];return _0x586844;};'use strict';var _=require(_0x5645('0x0'));var util=require('util');var moment=require(_0x5645('0x1'));var BPromise=require(_0x5645('0x2'));var rs=require(_0x5645('0x3'));var fs=require('fs');var Redis=require(_0x5645('0x4'));var db=require(_0x5645('0x5'))['db'];var utils=require(_0x5645('0x6'));var logger=require('../../config/logger')(_0x5645('0x7'));var config=require(_0x5645('0x8'));var jayson=require(_0x5645('0x9'));var client=jayson[_0x5645('0xa')][_0x5645('0xb')]({'port':0x232a});config[_0x5645('0xc')]=_[_0x5645('0xd')](config[_0x5645('0xc')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5645('0xc')]));require(_0x5645('0xe'))[_0x5645('0xf')](socket);function respondWithRpcPromise(_0x34fe4e,_0x7f9893,_0x16af81){return new BPromise(function(_0x587c61,_0x212e46){return client[_0x5645('0x10')](_0x34fe4e,_0x16af81)[_0x5645('0x11')](function(_0x21e32c){logger['info'](_0x5645('0x12'),_0x7f9893,'request\x20sent');logger[_0x5645('0x13')](_0x5645('0x14'),_0x7f9893,_0x5645('0x15'),JSON[_0x5645('0x16')](_0x21e32c));if(_0x21e32c[_0x5645('0x17')]){if(_0x21e32c[_0x5645('0x17')][_0x5645('0x18')]===0x1f4){logger[_0x5645('0x17')]('OpenchannelInteraction,\x20%s,\x20%s',_0x7f9893,_0x21e32c[_0x5645('0x17')][_0x5645('0x19')]);return _0x212e46(_0x21e32c[_0x5645('0x17')]['message']);}logger['error'](_0x5645('0x12'),_0x7f9893,_0x21e32c[_0x5645('0x17')]['message']);return _0x587c61(_0x21e32c[_0x5645('0x17')][_0x5645('0x19')]);}else{logger[_0x5645('0x1a')]('OpenchannelInteraction,\x20%s,\x20%s',_0x7f9893,_0x5645('0x15'));_0x587c61(_0x21e32c[_0x5645('0x1b')][_0x5645('0x19')]);}})[_0x5645('0x1c')](function(_0x5ac9ee){logger[_0x5645('0x17')]('OpenchannelInteraction,\x20%s,\x20%s',_0x7f9893,_0x5ac9ee);_0x212e46(_0x5ac9ee);});});}exports['UpdateOpenchannelInteraction']=function(_0x7c39d7){var _0x1e2cba=this;return new Promise(function(_0x2e3350,_0x59a491){return db[_0x5645('0x1d')]['update'](_0x7c39d7[_0x5645('0x1e')],{'raw':_0x7c39d7['options']?_0x7c39d7['options'][_0x5645('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x7c39d7['options']?_0x7c39d7[_0x5645('0x20')][_0x5645('0x21')]||null:null,'attributes':_0x7c39d7['options']?_0x7c39d7[_0x5645('0x20')][_0x5645('0x22')]||null:null,'limit':_0x7c39d7[_0x5645('0x20')]?_0x7c39d7['options'][_0x5645('0x23')]||null:null})[_0x5645('0x11')](function(_0x3f6929){logger[_0x5645('0x1a')]('UpdateOpenchannelInteraction',_0x7c39d7);logger['debug']('UpdateOpenchannelInteraction',_0x7c39d7,JSON['stringify'](_0x3f6929));_0x2e3350(_0x3f6929);})[_0x5645('0x1c')](function(_0x5df697){logger['error'](_0x5645('0x24'),_0x5df697[_0x5645('0x19')],_0x7c39d7);_0x59a491(_0x1e2cba[_0x5645('0x17')](0x1f4,_0x5df697[_0x5645('0x19')]));});});};exports[_0x5645('0x25')]=function(_0x351cbb){return new Promise(function(_0x3b9d8e,_0xc585f3){return db[_0x5645('0x1d')][_0x5645('0x26')]({'where':_0x351cbb[_0x5645('0x20')]?_0x351cbb[_0x5645('0x20')][_0x5645('0x21')]||null:null})[_0x5645('0x11')](function(_0x52ba45){if(_0x52ba45){return _0x52ba45[_0x5645('0x27')](_0x351cbb['body'][_0x5645('0x28')],_[_0x5645('0x29')](_0x351cbb[_0x5645('0x1e')],[_0x5645('0x28'),'id'])||{});}})[_0x5645('0x2a')](function(_0xc90d52){logger['info']('AddTags',_0x351cbb);logger[_0x5645('0x13')](_0x5645('0x2b'),_0x351cbb,JSON[_0x5645('0x16')](_0xc90d52));_0x3b9d8e(_0xc90d52);})[_0x5645('0x1c')](function(_0x3b070c){logger[_0x5645('0x17')](_0x5645('0x2b'),_0x3b070c[_0x5645('0x19')],_0x351cbb);_0xc585f3(_this[_0x5645('0x17')](0x1f4,_0x3b070c[_0x5645('0x19')]));});});};
\ No newline at end of file