19a0b1407f7e8196f6c0ee790207d213020a22c7
[motion-next.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
1 const a978_0x12a0=['error','debug','catch','update','create','info','../../config/logger','limit','raw','options','stringify','CreateWhatsappQueueReport','message','UpdateWhatsappQueueReport','WhatsappQueueReport','where','then','body','attributes'];(function(_0x1654d3,_0xf103fd){const _0x12a0b2=function(_0x36cc65){while(--_0x36cc65){_0x1654d3['push'](_0x1654d3['shift']());}};_0x12a0b2(++_0xf103fd);}(a978_0x12a0,0x199));const a978_0x36cc=function(_0x1654d3,_0xf103fd){_0x1654d3=_0x1654d3-0x1d3;let _0x12a0b2=a978_0x12a0[_0x1654d3];return _0x12a0b2;};const a978_0x3fd13b=a978_0x36cc;'use strict';const db=require('../../mysqldb')['db'],logger=require(a978_0x3fd13b(0x1e2))('rpc');exports[a978_0x3fd13b(0x1d4)]=function(_0x5d3d6c){const _0x1a25d9=this;return new Promise(function(_0x1fced2,_0x401d34){const _0x322aa2=a978_0x36cc;return db[_0x322aa2(0x1d7)][_0x322aa2(0x1e0)](_0x5d3d6c['body'],{'raw':_0x5d3d6c[_0x322aa2(0x1e5)]?_0x5d3d6c[_0x322aa2(0x1e5)]['raw']===undefined?!![]:![]:!![]})[_0x322aa2(0x1d9)](function(_0x473b8c){const _0x3354a5=_0x322aa2;logger[_0x3354a5(0x1e1)](_0x3354a5(0x1d4),_0x5d3d6c),logger[_0x3354a5(0x1dd)](_0x3354a5(0x1d4),_0x5d3d6c,JSON[_0x3354a5(0x1d3)](_0x473b8c)),_0x1fced2(_0x473b8c);})[_0x322aa2(0x1de)](function(_0x313dab){const _0x2fabf6=_0x322aa2;logger[_0x2fabf6(0x1dc)]('CreateWhatsappQueueReport',_0x313dab[_0x2fabf6(0x1d5)],_0x5d3d6c),_0x401d34(_0x1a25d9[_0x2fabf6(0x1dc)](0x1f4,_0x313dab[_0x2fabf6(0x1d5)]));});});},exports['UpdateWhatsappQueueReport']=function(_0x86fbbf){const _0x4f0041=this;return new Promise(function(_0x4b0eab,_0x1af370){const _0x589927=a978_0x36cc;return db[_0x589927(0x1d7)][_0x589927(0x1df)](_0x86fbbf[_0x589927(0x1da)],{'raw':_0x86fbbf['options']?_0x86fbbf[_0x589927(0x1e5)][_0x589927(0x1e4)]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x86fbbf[_0x589927(0x1e5)]?_0x86fbbf[_0x589927(0x1e5)][_0x589927(0x1d8)]||null:null,'attributes':_0x86fbbf['options']?_0x86fbbf['options'][_0x589927(0x1db)]||null:null,'limit':_0x86fbbf[_0x589927(0x1e5)]?_0x86fbbf['options'][_0x589927(0x1e3)]||null:null})['then'](function(_0x2faa7d){const _0x1cdd96=_0x589927;logger['info']('UpdateWhatsappQueueReport',_0x86fbbf),logger[_0x1cdd96(0x1dd)](_0x1cdd96(0x1d6),_0x86fbbf,JSON[_0x1cdd96(0x1d3)](_0x2faa7d)),_0x4b0eab(_0x2faa7d);})['catch'](function(_0x498d44){const _0x4d343a=_0x589927;logger['error'](_0x4d343a(0x1d6),_0x498d44['message'],_0x86fbbf),_0x1af370(_0x4f0041[_0x4d343a(0x1dc)](0x1f4,_0x498d44['message']));});});};