a17528f56f4338c4eb42f70dde5e5ad823714ee7
[motion-next.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
1 const a576_0x1b02=['CreateSmsQueueReport','../../mysqldb','debug','body','where','info','../../config/logger','options','message','then','catch','limit','create','SmsQueueReport','error','stringify','raw','update','UpdateSmsQueueReport'];(function(_0x18baee,_0x1b02d4){const _0x3dba30=function(_0x5def47){while(--_0x5def47){_0x18baee['push'](_0x18baee['shift']());}};_0x3dba30(++_0x1b02d4);}(a576_0x1b02,0x17a));const a576_0x3dba=function(_0x18baee,_0x1b02d4){_0x18baee=_0x18baee-0x0;let _0x3dba30=a576_0x1b02[_0x18baee];return _0x3dba30;};const _0x4407e5=a576_0x3dba;'use strict';const db=require(_0x4407e5('0x3'))['db'],logger=require(_0x4407e5('0x8'))('rpc');exports[_0x4407e5('0x2')]=function(_0x5def47){const _0x1c598a=this;return new Promise(function(_0x4caac9,_0x464be4){const _0x92198f=a576_0x3dba;return db[_0x92198f('0xf')][_0x92198f('0xe')](_0x5def47[_0x92198f('0x5')],{'raw':_0x5def47[_0x92198f('0x9')]?_0x5def47['options'][_0x92198f('0x12')]===undefined?!![]:![]:!![]})[_0x92198f('0xb')](function(_0x1a4132){const _0x5c5f2c=_0x92198f;logger[_0x5c5f2c('0x7')](_0x5c5f2c('0x2'),_0x5def47),logger['debug']('CreateSmsQueueReport',_0x5def47,JSON[_0x5c5f2c('0x11')](_0x1a4132)),_0x4caac9(_0x1a4132);})[_0x92198f('0xc')](function(_0x40b7d9){const _0x17fe9b=_0x92198f;logger['error'](_0x17fe9b('0x2'),_0x40b7d9[_0x17fe9b('0xa')],_0x5def47),_0x464be4(_0x1c598a[_0x17fe9b('0x10')](0x1f4,_0x40b7d9['message']));});});},exports[_0x4407e5('0x1')]=function(_0x5a3fc9){const _0x2197a7=this;return new Promise(function(_0x40d9db,_0x5bfea3){const _0x4af56e=a576_0x3dba;return db[_0x4af56e('0xf')][_0x4af56e('0x0')](_0x5a3fc9[_0x4af56e('0x5')],{'raw':_0x5a3fc9[_0x4af56e('0x9')]?_0x5a3fc9[_0x4af56e('0x9')][_0x4af56e('0x12')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5a3fc9[_0x4af56e('0x9')]?_0x5a3fc9['options'][_0x4af56e('0x6')]||null:null,'attributes':_0x5a3fc9[_0x4af56e('0x9')]?_0x5a3fc9['options']['attributes']||null:null,'limit':_0x5a3fc9['options']?_0x5a3fc9[_0x4af56e('0x9')][_0x4af56e('0xd')]||null:null})[_0x4af56e('0xb')](function(_0x535dd0){const _0x2e6e9b=_0x4af56e;logger[_0x2e6e9b('0x7')](_0x2e6e9b('0x1'),_0x5a3fc9),logger[_0x2e6e9b('0x4')]('UpdateSmsQueueReport',_0x5a3fc9,JSON[_0x2e6e9b('0x11')](_0x535dd0)),_0x40d9db(_0x535dd0);})[_0x4af56e('0xc')](function(_0x435369){const _0x2efc05=_0x4af56e;logger[_0x2efc05('0x10')](_0x2efc05('0x1'),_0x435369[_0x2efc05('0xa')],_0x5a3fc9),_0x5bfea3(_0x2197a7[_0x2efc05('0x10')](0x1f4,_0x435369[_0x2efc05('0xa')]));});});};