999d2bcce3938f3d43c5a4c03d347a0cbfcbaf25
[motion-next.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
1 const a525_0x2c41=['raw','debug','../../config/logger','message','ReportAgentPreview','then','body','error','create','../../mysqldb','rpc','CreateReportAgentPreview','stringify','info','options'];(function(_0x5dc79d,_0x2c4156){const _0x207fda=function(_0x2e33ec){while(--_0x2e33ec){_0x5dc79d['push'](_0x5dc79d['shift']());}};_0x207fda(++_0x2c4156);}(a525_0x2c41,0x8c));const a525_0x207f=function(_0x5dc79d,_0x2c4156){_0x5dc79d=_0x5dc79d-0x0;let _0x207fda=a525_0x2c41[_0x5dc79d];return _0x207fda;};const _0x3e3a7a=a525_0x207f;'use strict';const db=require(_0x3e3a7a('0x4'))['db'],logger=require(_0x3e3a7a('0xc'))(_0x3e3a7a('0x5'));exports[_0x3e3a7a('0x6')]=function(_0x2e33ec){const _0x5f0665=this;return new Promise(function(_0xe4d810,_0x3dbafd){const _0x4861ce=a525_0x207f;return db[_0x4861ce('0xe')][_0x4861ce('0x3')](_0x2e33ec[_0x4861ce('0x1')],{'raw':_0x2e33ec[_0x4861ce('0x9')]?_0x2e33ec['options'][_0x4861ce('0xa')]===undefined?!![]:![]:!![]})[_0x4861ce('0x0')](function(_0xaf55d3){const _0x27deda=_0x4861ce;logger[_0x27deda('0x8')](_0x27deda('0x6'),_0x2e33ec),logger[_0x27deda('0xb')](_0x27deda('0x6'),_0x2e33ec,JSON[_0x27deda('0x7')](_0xaf55d3)),_0xe4d810(_0xaf55d3);})['catch'](function(_0x507815){const _0x31eaa3=_0x4861ce;logger[_0x31eaa3('0x2')](_0x31eaa3('0x6'),_0x507815[_0x31eaa3('0xd')],_0x2e33ec),_0x3dbafd(_0x5f0665[_0x31eaa3('0x2')](0x1f4,_0x507815[_0x31eaa3('0xd')]));});});};