Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / api / smsInteraction / smsInteraction.rpc.js
1 const a556_0x1283=['./smsInteraction.socket','AddTagsToSmsInteraction','options','UpdateSmsInteraction','register','info','message','../../config/logger','error','attributes','then','findOne','debug','../../mysqldb','catch','AddTags','stringify','../../rediscache','SmsInteraction','lodash','where','rpc','raw','body','ids','omit'];(function(_0x1a34a6,_0x12831d){const _0x571c92=function(_0x408d46){while(--_0x408d46){_0x1a34a6['push'](_0x1a34a6['shift']());}};_0x571c92(++_0x12831d);}(a556_0x1283,0x140));const a556_0x571c=function(_0x1a34a6,_0x12831d){_0x1a34a6=_0x1a34a6-0x0;let _0x571c92=a556_0x1283[_0x1a34a6];return _0x571c92;};const _0x5d8e1c=a556_0x571c;'use strict';const _=require(_0x5d8e1c('0xb')),db=require(_0x5d8e1c('0x5'))['db'],logger=require(_0x5d8e1c('0x19'))(_0x5d8e1c('0xd')),{getSocket}=require(_0x5d8e1c('0x9')),socket=getSocket();require(_0x5d8e1c('0x12'))[_0x5d8e1c('0x16')](socket),exports[_0x5d8e1c('0x15')]=function(_0x408d46){const _0x4238c9=this;return new Promise(function(_0x164f82,_0x44e54a){const _0x226f4b=a556_0x571c;return db[_0x226f4b('0xa')]['update'](_0x408d46['body'],{'raw':_0x408d46['options']?_0x408d46[_0x226f4b('0x14')][_0x226f4b('0xe')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x408d46[_0x226f4b('0x14')]?_0x408d46[_0x226f4b('0x14')][_0x226f4b('0xc')]||null:null,'attributes':_0x408d46[_0x226f4b('0x14')]?_0x408d46[_0x226f4b('0x14')][_0x226f4b('0x1')]||null:null,'limit':_0x408d46[_0x226f4b('0x14')]?_0x408d46[_0x226f4b('0x14')]['limit']||null:null})[_0x226f4b('0x2')](function(_0x3c47d4){const _0x1b1aa9=_0x226f4b;logger[_0x1b1aa9('0x17')](_0x1b1aa9('0x15'),_0x408d46),logger[_0x1b1aa9('0x4')](_0x1b1aa9('0x15'),_0x408d46,JSON['stringify'](_0x3c47d4)),_0x164f82(_0x3c47d4);})[_0x226f4b('0x6')](function(_0x41ef96){const _0x25759d=_0x226f4b;logger[_0x25759d('0x0')](_0x25759d('0x15'),_0x41ef96[_0x25759d('0x18')],_0x408d46),_0x44e54a(_0x4238c9['error'](0x1f4,_0x41ef96[_0x25759d('0x18')]));});});},exports[_0x5d8e1c('0x13')]=function(_0xc713df){const _0x5884c3=this;return new Promise(function(_0x30e185,_0x1ddc40){const _0x5707e2=a556_0x571c;return db[_0x5707e2('0xa')][_0x5707e2('0x3')]({'where':_0xc713df[_0x5707e2('0x14')]?_0xc713df[_0x5707e2('0x14')][_0x5707e2('0xc')]||null:null})['then'](function(_0x38cd9d){const _0x146293=_0x5707e2;if(_0x38cd9d)return _0x38cd9d['addTags'](_0xc713df[_0x146293('0xf')]['ids'],{'through':_[_0x146293('0x11')](_0xc713df[_0x146293('0xf')],[_0x146293('0x10'),'id'])});})[_0x5707e2('0x2')](function([_0x491d0d]){const _0x4c94c0=_0x5707e2;logger[_0x4c94c0('0x17')](_0x4c94c0('0x7'),_0xc713df),logger[_0x4c94c0('0x4')]('AddTags',_0xc713df,JSON[_0x4c94c0('0x8')](_0x491d0d)),_0x30e185(_0x491d0d);})['catch'](function(_0x1fcc3c){const _0x4bc04b=_0x5707e2;logger['error'](_0x4bc04b('0x7'),_0x1fcc3c[_0x4bc04b('0x18')],_0xc713df),_0x1ddc40(_0x5884c3[_0x4bc04b('0x0')](0x1f4,_0x1fcc3c[_0x4bc04b('0x18')]));});});};