Built motion from commit be44e1e4d16f8b29d243415b03d27262d8601e0e. Version 3.0.0...
[motion-next.git] / server / api / openchannelInteraction / openchannelInteraction.rpc.js
1 const a483_0x5951=['rpc','where','options','UpdateOpenchannelInteraction','info','update','attributes','then','findOne','ids','limit','omit','../../config/logger','message','stringify','debug','addTags','lodash','AddTags','error','OpenchannelInteraction','AddTagsToOpenchannelInteraction','body','../../mysqldb','catch'];(function(_0x24105d,_0x5951c1){const _0x47fa7b=function(_0x106a1b){while(--_0x106a1b){_0x24105d['push'](_0x24105d['shift']());}};_0x47fa7b(++_0x5951c1);}(a483_0x5951,0x164));const a483_0x47fa=function(_0x24105d,_0x5951c1){_0x24105d=_0x24105d-0x0;let _0x47fa7b=a483_0x5951[_0x24105d];return _0x47fa7b;};const _0x2c9d7a=a483_0x47fa;'use strict';const _=require(_0x2c9d7a('0xb')),db=require(_0x2c9d7a('0x11'))['db'],logger=require(_0x2c9d7a('0x6'))(_0x2c9d7a('0x13')),{getSocket}=require('../../rediscache'),socket=getSocket();require('./openchannelInteraction.socket')['register'](socket),exports['UpdateOpenchannelInteraction']=function(_0x106a1b){const _0x5e5986=this;return new Promise(function(_0x4097ba,_0x34e2c0){const _0x5b3e53=a483_0x47fa;return db[_0x5b3e53('0xe')][_0x5b3e53('0x18')](_0x106a1b[_0x5b3e53('0x10')],{'raw':_0x106a1b[_0x5b3e53('0x15')]?_0x106a1b[_0x5b3e53('0x15')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x106a1b[_0x5b3e53('0x15')]?_0x106a1b[_0x5b3e53('0x15')][_0x5b3e53('0x14')]||null:null,'attributes':_0x106a1b['options']?_0x106a1b['options'][_0x5b3e53('0x0')]||null:null,'limit':_0x106a1b[_0x5b3e53('0x15')]?_0x106a1b[_0x5b3e53('0x15')][_0x5b3e53('0x4')]||null:null})['then'](function(_0x244591){const _0x88c96=_0x5b3e53;logger[_0x88c96('0x17')](_0x88c96('0x16'),_0x106a1b),logger[_0x88c96('0x9')](_0x88c96('0x16'),_0x106a1b,JSON[_0x88c96('0x8')](_0x244591)),_0x4097ba(_0x244591);})[_0x5b3e53('0x12')](function(_0x2013eb){const _0x4c87ca=_0x5b3e53;logger['error']('UpdateOpenchannelInteraction',_0x2013eb[_0x4c87ca('0x7')],_0x106a1b),_0x34e2c0(_0x5e5986[_0x4c87ca('0xd')](0x1f4,_0x2013eb[_0x4c87ca('0x7')]));});});},exports[_0x2c9d7a('0xf')]=function(_0x123f3f){const _0x6f8a0=this;return new Promise(function(_0x1fcd9f,_0x13907a){const _0x502b5f=a483_0x47fa;return db['OpenchannelInteraction'][_0x502b5f('0x2')]({'where':_0x123f3f['options']?_0x123f3f[_0x502b5f('0x15')][_0x502b5f('0x14')]||null:null})[_0x502b5f('0x1')](function(_0x261c6d){const _0x4b1e36=_0x502b5f;if(_0x261c6d)return _0x261c6d[_0x4b1e36('0xa')](_0x123f3f[_0x4b1e36('0x10')][_0x4b1e36('0x3')],{'through':_[_0x4b1e36('0x5')](_0x123f3f['body'],[_0x4b1e36('0x3'),'id'])});})[_0x502b5f('0x1')](function([_0x20c5d2]){const _0x35dafa=_0x502b5f;logger[_0x35dafa('0x17')]('AddTags',_0x123f3f),logger[_0x35dafa('0x9')]('AddTags',_0x123f3f,JSON['stringify'](_0x20c5d2)),_0x1fcd9f(_0x20c5d2);})[_0x502b5f('0x12')](function(_0x35fc4e){const _0x409b87=_0x502b5f;logger['error'](_0x409b87('0xc'),_0x35fc4e[_0x409b87('0x7')],_0x123f3f),_0x13907a(_0x6f8a0[_0x409b87('0xd')](0x1f4,_0x35fc4e[_0x409b87('0x7')]));});});};