f93c4ba2a4b449a463f3a5cd7d15b0cbec407fc2
[motion-next.git] / server / api / openchannelQueueReport / openchannelQueueReport.rpc.js
1 const a503_0xca7a=['../../mysqldb','CreateOpenchannelQueueReport','then','raw','limit','message','update','options','where','body','error','catch','OpenchannelQueueReport','stringify','debug','UpdateOpenchannelQueueReport','info'];(function(_0x29d399,_0xca7a24){const _0x104d47=function(_0x528feb){while(--_0x528feb){_0x29d399['push'](_0x29d399['shift']());}};_0x104d47(++_0xca7a24);}(a503_0xca7a,0x1ee));const a503_0x104d=function(_0x29d399,_0xca7a24){_0x29d399=_0x29d399-0x0;let _0x104d47=a503_0xca7a[_0x29d399];return _0x104d47;};const _0x294d70=a503_0x104d;'use strict';const db=require(_0x294d70('0x10'))['db'],logger=require('../../config/logger')('rpc');exports[_0x294d70('0x0')]=function(_0x528feb){const _0x6eb294=this;return new Promise(function(_0x2226db,_0x255166){const _0x482005=a503_0x104d;return db[_0x482005('0xb')]['create'](_0x528feb[_0x482005('0x8')],{'raw':_0x528feb[_0x482005('0x6')]?_0x528feb['options']['raw']===undefined?!![]:![]:!![]})[_0x482005('0x1')](function(_0xbc4799){const _0x53d13e=_0x482005;logger[_0x53d13e('0xf')](_0x53d13e('0x0'),_0x528feb),logger[_0x53d13e('0xd')](_0x53d13e('0x0'),_0x528feb,JSON[_0x53d13e('0xc')](_0xbc4799)),_0x2226db(_0xbc4799);})[_0x482005('0xa')](function(_0x359316){const _0x297ac5=_0x482005;logger[_0x297ac5('0x9')](_0x297ac5('0x0'),_0x359316[_0x297ac5('0x4')],_0x528feb),_0x255166(_0x6eb294[_0x297ac5('0x9')](0x1f4,_0x359316[_0x297ac5('0x4')]));});});},exports[_0x294d70('0xe')]=function(_0x13b24f){const _0x224522=this;return new Promise(function(_0x2e8e8b,_0x19355f){const _0x56f2c1=a503_0x104d;return db[_0x56f2c1('0xb')][_0x56f2c1('0x5')](_0x13b24f['body'],{'raw':_0x13b24f[_0x56f2c1('0x6')]?_0x13b24f[_0x56f2c1('0x6')][_0x56f2c1('0x2')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x13b24f['options']?_0x13b24f['options'][_0x56f2c1('0x7')]||null:null,'attributes':_0x13b24f[_0x56f2c1('0x6')]?_0x13b24f[_0x56f2c1('0x6')]['attributes']||null:null,'limit':_0x13b24f[_0x56f2c1('0x6')]?_0x13b24f['options'][_0x56f2c1('0x3')]||null:null})['then'](function(_0x2b1d71){const _0x489eec=_0x56f2c1;logger[_0x489eec('0xf')](_0x489eec('0xe'),_0x13b24f),logger[_0x489eec('0xd')](_0x489eec('0xe'),_0x13b24f,JSON[_0x489eec('0xc')](_0x2b1d71)),_0x2e8e8b(_0x2b1d71);})[_0x56f2c1('0xa')](function(_0x3a9e99){const _0x191978=_0x56f2c1;logger[_0x191978('0x9')](_0x191978('0xe'),_0x3a9e99[_0x191978('0x4')],_0x13b24f),_0x19355f(_0x224522['error'](0x1f4,_0x3a9e99[_0x191978('0x4')]));});});};