e22efb354db8934dbed64259737036ba30752729
[motion-next.git] / server / api / mailServerIn / mailServerIn.rpc.js
1 const a433_0x2d12=['GetMailServerIn','debug','info','include','map','error','raw','rpc','attributes','MailServerIn','catch','findAll','stringify','where','../../config/logger','options','limit','lodash','model'];(function(_0x2fd05d,_0x2d12b0){const _0x5f0bf3=function(_0x3a282d){while(--_0x3a282d){_0x2fd05d['push'](_0x2fd05d['shift']());}};_0x5f0bf3(++_0x2d12b0);}(a433_0x2d12,0x130));const a433_0x5f0b=function(_0x2fd05d,_0x2d12b0){_0x2fd05d=_0x2fd05d-0x0;let _0x5f0bf3=a433_0x2d12[_0x2fd05d];return _0x5f0bf3;};const _0x49a131=a433_0x5f0b;'use strict';const _=require(_0x49a131('0x11')),db=require('../../mysqldb')['db'],logger=require(_0x49a131('0xe'))(_0x49a131('0x7'));exports[_0x49a131('0x0')]=function(_0x3a282d){const _0x437fdb=this;return new Promise(function(_0x47d6cb,_0x5b5dd4){const _0x365e66=a433_0x5f0b;return db[_0x365e66('0x9')][_0x365e66('0xb')]({'raw':_0x3a282d[_0x365e66('0xf')]?_0x3a282d[_0x365e66('0xf')][_0x365e66('0x6')]===undefined?!![]:![]:!![],'where':_0x3a282d[_0x365e66('0xf')]?_0x3a282d[_0x365e66('0xf')][_0x365e66('0xd')]||null:null,'attributes':_0x3a282d['options']?_0x3a282d['options'][_0x365e66('0x8')]||null:null,'limit':_0x3a282d[_0x365e66('0xf')]?_0x3a282d[_0x365e66('0xf')][_0x365e66('0x10')]||null:null,'include':_0x3a282d['options']?_0x3a282d['options'][_0x365e66('0x3')]?_['map'](_0x3a282d['options'][_0x365e66('0x3')],function(_0x2efcb3){const _0x17265b=_0x365e66;return{'model':db[_0x2efcb3['model']],'as':_0x2efcb3['as'],'attributes':_0x2efcb3['attributes'],'include':_0x2efcb3[_0x17265b('0x3')]?_[_0x17265b('0x4')](_0x2efcb3['include'],function(_0xe0f78f){const _0x1f10e1=_0x17265b;return{'model':db[_0xe0f78f[_0x1f10e1('0x12')]],'as':_0xe0f78f['as'],'attributes':_0xe0f78f[_0x1f10e1('0x8')],'include':_0xe0f78f[_0x1f10e1('0x3')]?_['map'](_0xe0f78f[_0x1f10e1('0x3')],function(_0x5be622){const _0x50fafd=_0x1f10e1;return{'model':db[_0x5be622['model']],'as':_0x5be622['as'],'attributes':_0x5be622[_0x50fafd('0x8')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3e970f){const _0x562a8d=_0x365e66;logger[_0x562a8d('0x2')](_0x562a8d('0x0'),_0x3a282d),logger[_0x562a8d('0x1')](_0x562a8d('0x0'),_0x3a282d,JSON[_0x562a8d('0xc')](_0x3e970f)),_0x47d6cb(_0x3e970f);})[_0x365e66('0xa')](function(_0x3510c2){const _0x3ea719=_0x365e66;logger[_0x3ea719('0x5')](_0x3ea719('0x0'),_0x3510c2['message'],_0x3a282d),_0x5b5dd4(_0x437fdb['error'](0x1f4,_0x3510c2['message']));});});};