Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / api / intVtigerAccount / intVtigerAccount.rpc.js
1 const a322_0x593c=['then','options','map','where','ShowVtigerAccount','info','findAll','VtigerAccount','attributes','message','raw','lodash','GetVtigerAccount','include','limit','catch','debug','stringify','findOne','../../config/logger','error','model'];(function(_0x251dfe,_0x593c2b){const _0x2a7a16=function(_0x3ea268){while(--_0x3ea268){_0x251dfe['push'](_0x251dfe['shift']());}};_0x2a7a16(++_0x593c2b);}(a322_0x593c,0x8a));const a322_0x2a7a=function(_0x251dfe,_0x593c2b){_0x251dfe=_0x251dfe-0x0;let _0x2a7a16=a322_0x593c[_0x251dfe];return _0x2a7a16;};const _0x42818d=a322_0x2a7a;'use strict';const _=require(_0x42818d('0x5')),db=require('../../mysqldb')['db'],logger=require(_0x42818d('0xd'))('rpc');exports[_0x42818d('0x6')]=function(_0x3ea268){const _0x72a24c=this;return new Promise(function(_0x15405f,_0x27e2a3){const _0x83ba04=a322_0x2a7a;return db[_0x83ba04('0x1')][_0x83ba04('0x0')]({'raw':_0x3ea268['options']?_0x3ea268[_0x83ba04('0x11')][_0x83ba04('0x4')]===undefined?!![]:![]:!![],'where':_0x3ea268[_0x83ba04('0x11')]?_0x3ea268[_0x83ba04('0x11')][_0x83ba04('0x13')]||null:null,'attributes':_0x3ea268[_0x83ba04('0x11')]?_0x3ea268[_0x83ba04('0x11')]['attributes']||null:null,'limit':_0x3ea268[_0x83ba04('0x11')]?_0x3ea268[_0x83ba04('0x11')][_0x83ba04('0x8')]||null:null,'include':_0x3ea268[_0x83ba04('0x11')]?_0x3ea268[_0x83ba04('0x11')][_0x83ba04('0x7')]?_[_0x83ba04('0x12')](_0x3ea268[_0x83ba04('0x11')]['include'],function(_0x104b37){const _0x1de4c4=_0x83ba04;return{'model':db[_0x104b37[_0x1de4c4('0xf')]],'as':_0x104b37['as'],'attributes':_0x104b37[_0x1de4c4('0x2')],'include':_0x104b37[_0x1de4c4('0x7')]?_['map'](_0x104b37['include'],function(_0x5cdc2e){const _0x4ede86=_0x1de4c4;return{'model':db[_0x5cdc2e[_0x4ede86('0xf')]],'as':_0x5cdc2e['as'],'attributes':_0x5cdc2e[_0x4ede86('0x2')],'include':_0x5cdc2e[_0x4ede86('0x7')]?_[_0x4ede86('0x12')](_0x5cdc2e[_0x4ede86('0x7')],function(_0xfacf4d){const _0x4b0ce1=_0x4ede86;return{'model':db[_0xfacf4d[_0x4b0ce1('0xf')]],'as':_0xfacf4d['as'],'attributes':_0xfacf4d[_0x4b0ce1('0x2')]};}):[]};}):[]};}):[]:[]})[_0x83ba04('0x10')](function(_0x50f894){const _0x3539c3=_0x83ba04;logger[_0x3539c3('0x15')](_0x3539c3('0x6'),_0x3ea268),logger[_0x3539c3('0xa')]('GetVtigerAccount',_0x3ea268,JSON['stringify'](_0x50f894)),_0x15405f(_0x50f894);})['catch'](function(_0x574b83){const _0x2327ee=_0x83ba04;logger['error']('GetVtigerAccount',_0x574b83[_0x2327ee('0x3')],_0x3ea268),_0x27e2a3(_0x72a24c['error'](0x1f4,_0x574b83[_0x2327ee('0x3')]));});});},exports['ShowVtigerAccount']=function(_0x445eb7){const _0x4d3f90=this;return new Promise(function(_0x246cd6,_0x41bcfe){const _0x54c17b=a322_0x2a7a;return db[_0x54c17b('0x1')][_0x54c17b('0xc')]({'raw':_0x445eb7['options']?_0x445eb7[_0x54c17b('0x11')]['raw']===undefined?!![]:![]:!![],'where':_0x445eb7[_0x54c17b('0x11')]?_0x445eb7[_0x54c17b('0x11')][_0x54c17b('0x13')]||null:null,'attributes':_0x445eb7[_0x54c17b('0x11')]?_0x445eb7[_0x54c17b('0x11')][_0x54c17b('0x2')]||null:null,'include':_0x445eb7['options']?_0x445eb7['options']['include']?_['map'](_0x445eb7[_0x54c17b('0x11')][_0x54c17b('0x7')],function(_0x586966){const _0x1e0144=_0x54c17b;return{'model':db[_0x586966[_0x1e0144('0xf')]],'as':_0x586966['as'],'attributes':_0x586966[_0x1e0144('0x2')],'include':_0x586966['include']?_[_0x1e0144('0x12')](_0x586966[_0x1e0144('0x7')],function(_0x3fa494){const _0x5dcc30=_0x1e0144;return{'model':db[_0x3fa494['model']],'as':_0x3fa494['as'],'attributes':_0x3fa494[_0x5dcc30('0x2')],'include':_0x3fa494['include']?_[_0x5dcc30('0x12')](_0x3fa494[_0x5dcc30('0x7')],function(_0x1b38df){const _0x5023ff=_0x5dcc30;return{'model':db[_0x1b38df[_0x5023ff('0xf')]],'as':_0x1b38df['as'],'attributes':_0x1b38df[_0x5023ff('0x2')]};}):[]};}):[]};}):[]:[]})[_0x54c17b('0x10')](function(_0x6240bc){const _0x3c1e55=_0x54c17b;logger[_0x3c1e55('0x15')](_0x3c1e55('0x14'),_0x445eb7),logger[_0x3c1e55('0xa')](_0x3c1e55('0x14'),_0x445eb7,JSON[_0x3c1e55('0xb')](_0x6240bc)),_0x246cd6(_0x6240bc);})[_0x54c17b('0x9')](function(_0x27bef0){const _0x1909b2=_0x54c17b;logger[_0x1909b2('0xe')](_0x1909b2('0x14'),_0x27bef0['message'],_0x445eb7),_0x41bcfe(_0x4d3f90[_0x1909b2('0xe')](0x1f4,_0x27bef0['message']));});});};