Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
1 const a483_0xcf7f=['OpenchannelInteraction','AddTags','limit','UpdateOpenchannelInteraction','message','where','rpc','AddTagsToOpenchannelInteraction','ids','./openchannelInteraction.socket','../../config/logger','options','body','lodash','then','../../rediscache','stringify','update','info','register','omit','error','raw','../../mysqldb','findOne'];(function(_0x211788,_0xcf7fa3){const _0x9e0396=function(_0x20f4f6){while(--_0x20f4f6){_0x211788['push'](_0x211788['shift']());}};_0x9e0396(++_0xcf7fa3);}(a483_0xcf7f,0x175));const a483_0x9e03=function(_0x211788,_0xcf7fa3){_0x211788=_0x211788-0x0;let _0x9e0396=a483_0xcf7f[_0x211788];return _0x9e0396;};const _0x2e2b2c=a483_0x9e03;'use strict';const _=require(_0x2e2b2c('0xf')),db=require(_0x2e2b2c('0x0'))['db'],logger=require(_0x2e2b2c('0xc'))(_0x2e2b2c('0x8')),{getSocket}=require(_0x2e2b2c('0x11')),socket=getSocket();require(_0x2e2b2c('0xb'))[_0x2e2b2c('0x15')](socket),exports[_0x2e2b2c('0x5')]=function(_0x20f4f6){const _0x5856f0=this;return new Promise(function(_0xb86fa9,_0x487836){const _0x41a910=a483_0x9e03;return db[_0x41a910('0x2')][_0x41a910('0x13')](_0x20f4f6[_0x41a910('0xe')],{'raw':_0x20f4f6[_0x41a910('0xd')]?_0x20f4f6[_0x41a910('0xd')][_0x41a910('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x20f4f6[_0x41a910('0xd')]?_0x20f4f6[_0x41a910('0xd')][_0x41a910('0x7')]||null:null,'attributes':_0x20f4f6[_0x41a910('0xd')]?_0x20f4f6[_0x41a910('0xd')]['attributes']||null:null,'limit':_0x20f4f6[_0x41a910('0xd')]?_0x20f4f6[_0x41a910('0xd')][_0x41a910('0x4')]||null:null})[_0x41a910('0x10')](function(_0x306ff4){const _0x4bb748=_0x41a910;logger[_0x4bb748('0x14')](_0x4bb748('0x5'),_0x20f4f6),logger['debug'](_0x4bb748('0x5'),_0x20f4f6,JSON[_0x4bb748('0x12')](_0x306ff4)),_0xb86fa9(_0x306ff4);})['catch'](function(_0x41e176){const _0x4970e7=_0x41a910;logger['error'](_0x4970e7('0x5'),_0x41e176[_0x4970e7('0x6')],_0x20f4f6),_0x487836(_0x5856f0[_0x4970e7('0x17')](0x1f4,_0x41e176[_0x4970e7('0x6')]));});});},exports[_0x2e2b2c('0x9')]=function(_0x47fbe4){const _0xa33bfa=this;return new Promise(function(_0x4113c9,_0x5a6dcf){const _0x743798=a483_0x9e03;return db[_0x743798('0x2')][_0x743798('0x1')]({'where':_0x47fbe4['options']?_0x47fbe4[_0x743798('0xd')][_0x743798('0x7')]||null:null})[_0x743798('0x10')](function(_0x4fcb40){const _0x32c6e2=_0x743798;if(_0x4fcb40)return _0x4fcb40['addTags'](_0x47fbe4[_0x32c6e2('0xe')][_0x32c6e2('0xa')],{'through':_[_0x32c6e2('0x16')](_0x47fbe4['body'],[_0x32c6e2('0xa'),'id'])});})['then'](function([_0x51a934]){const _0x44b4bb=_0x743798;logger[_0x44b4bb('0x14')](_0x44b4bb('0x3'),_0x47fbe4),logger['debug'](_0x44b4bb('0x3'),_0x47fbe4,JSON['stringify'](_0x51a934)),_0x4113c9(_0x51a934);})['catch'](function(_0x22c243){const _0x5f44d9=_0x743798;logger[_0x5f44d9('0x17')](_0x5f44d9('0x3'),_0x22c243[_0x5f44d9('0x6')],_0x47fbe4),_0x5a6dcf(_0xa33bfa[_0x5f44d9('0x17')](0x1f4,_0x22c243[_0x5f44d9('0x6')]));});});};