cab7855a118efd2fe9c8eace6f7aa1cf71d5043b
[motion-next.git] / server / api / cmHopperFinal / cmHopperFinal.rpc.js
1 const a149_0x3a4f=['error','CreateCmHopperFinal','rpc','options','../../mysqldb','debug','then','stringify','message','CmHopperFinal','create','catch'];(function(_0x2dbaa,_0x3a4fe5){const _0x5a59ec=function(_0xad97bb){while(--_0xad97bb){_0x2dbaa['push'](_0x2dbaa['shift']());}};_0x5a59ec(++_0x3a4fe5);}(a149_0x3a4f,0x1e7));const a149_0x5a59=function(_0x2dbaa,_0x3a4fe5){_0x2dbaa=_0x2dbaa-0x0;let _0x5a59ec=a149_0x3a4f[_0x2dbaa];return _0x5a59ec;};const _0x45122f=a149_0x5a59;'use strict';const db=require(_0x45122f('0x9'))['db'],logger=require('../../config/logger')(_0x45122f('0x7'));exports[_0x45122f('0x6')]=function(_0xad97bb){const _0x32081e=this;return new Promise(function(_0x189207,_0x3be6ac){const _0x38f2b5=a149_0x5a59;return db[_0x38f2b5('0x2')][_0x38f2b5('0x3')](_0xad97bb['body'],{'raw':_0xad97bb[_0x38f2b5('0x8')]?_0xad97bb[_0x38f2b5('0x8')]['raw']===undefined?!![]:![]:!![]})[_0x38f2b5('0xb')](function(_0x518e14){const _0x54a1e3=_0x38f2b5;logger['info'](_0x54a1e3('0x6'),_0xad97bb),logger[_0x54a1e3('0xa')](_0x54a1e3('0x6'),_0xad97bb,JSON[_0x54a1e3('0x0')](_0x518e14)),_0x189207(_0x518e14);})[_0x38f2b5('0x4')](function(_0x1f6634){const _0x2fab53=_0x38f2b5;logger[_0x2fab53('0x5')](_0x2fab53('0x6'),_0x1f6634[_0x2fab53('0x1')],_0xad97bb),_0x3be6ac(_0x32081e[_0x2fab53('0x5')](0x1f4,_0x1f6634[_0x2fab53('0x1')]));});});};