Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index 18b9714..da24056 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc961=['request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','catch','UpdateWhatsappQueueReport','raw','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','rpc','jayson/promise','http','then','info','WhatsappQueueReport,\x20%s,\x20%s'];(function(_0x3b7205,_0x4d6931){var _0x1fb858=function(_0x20db4c){while(--_0x20db4c){_0x3b7205['push'](_0x3b7205['shift']());}};_0x1fb858(++_0x4d6931);}(_0xc961,0x17a));var _0x1c96=function(_0x39f097,_0x17116b){_0x39f097=_0x39f097-0x0;var _0x544f6a=_0xc961[_0x39f097];return _0x544f6a;};'use strict';var _=require(_0x1c96('0x0'));var util=require(_0x1c96('0x1'));var moment=require(_0x1c96('0x2'));var BPromise=require(_0x1c96('0x3'));var rs=require(_0x1c96('0x4'));var fs=require('fs');var Redis=require(_0x1c96('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x1c96('0x6'));var config=require('../../config/environment');var jayson=require(_0x1c96('0x7'));var client=jayson['client'][_0x1c96('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2d4b23,_0x1f09ff,_0x307846){return new BPromise(function(_0x2e4fa5,_0x473a4c){return client['request'](_0x2d4b23,_0x307846)[_0x1c96('0x9')](function(_0x362e46){logger[_0x1c96('0xa')](_0x1c96('0xb'),_0x1f09ff,_0x1c96('0xc'));logger[_0x1c96('0xd')](_0x1c96('0xe'),_0x1f09ff,_0x1c96('0xc'),JSON[_0x1c96('0xf')](_0x362e46));if(_0x362e46[_0x1c96('0x10')]){if(_0x362e46[_0x1c96('0x10')][_0x1c96('0x11')]===0x1f4){logger['error'](_0x1c96('0xb'),_0x1f09ff,_0x362e46[_0x1c96('0x10')]['message']);return _0x473a4c(_0x362e46[_0x1c96('0x10')][_0x1c96('0x12')]);}logger[_0x1c96('0x10')](_0x1c96('0xb'),_0x1f09ff,_0x362e46[_0x1c96('0x10')][_0x1c96('0x12')]);return _0x2e4fa5(_0x362e46[_0x1c96('0x10')][_0x1c96('0x12')]);}else{logger[_0x1c96('0xa')](_0x1c96('0xb'),_0x1f09ff,_0x1c96('0xc'));_0x2e4fa5(_0x362e46[_0x1c96('0x13')][_0x1c96('0x12')]);}})['catch'](function(_0x32596e){logger['error'](_0x1c96('0xb'),_0x1f09ff,_0x32596e);_0x473a4c(_0x32596e);});});}exports[_0x1c96('0x14')]=function(_0x595429){var _0x29dafb=this;return new Promise(function(_0x491875,_0x57efce){return db[_0x1c96('0x15')][_0x1c96('0x16')](_0x595429[_0x1c96('0x17')],{'raw':_0x595429['options']?_0x595429[_0x1c96('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x1c96('0x9')](function(_0x174ebf){logger['info'](_0x1c96('0x14'),_0x595429);logger['debug'](_0x1c96('0x14'),_0x595429,JSON[_0x1c96('0xf')](_0x174ebf));_0x491875(_0x174ebf);})[_0x1c96('0x19')](function(_0x3f4293){logger[_0x1c96('0x10')](_0x1c96('0x14'),_0x3f4293[_0x1c96('0x12')],_0x595429);_0x57efce(_0x29dafb[_0x1c96('0x10')](0x1f4,_0x3f4293[_0x1c96('0x12')]));});});};exports[_0x1c96('0x1a')]=function(_0x4d2c9c){var _0x24c60c=this;return new Promise(function(_0x18b849,_0x289ee5){return db['WhatsappQueueReport']['update'](_0x4d2c9c[_0x1c96('0x17')],{'raw':_0x4d2c9c[_0x1c96('0x18')]?_0x4d2c9c['options'][_0x1c96('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4d2c9c[_0x1c96('0x18')]?_0x4d2c9c[_0x1c96('0x18')]['where']||null:null,'attributes':_0x4d2c9c['options']?_0x4d2c9c[_0x1c96('0x18')][_0x1c96('0x1c')]||null:null,'limit':_0x4d2c9c['options']?_0x4d2c9c[_0x1c96('0x18')][_0x1c96('0x1d')]||null:null})[_0x1c96('0x9')](function(_0x25db8a){logger['info']('UpdateWhatsappQueueReport',_0x4d2c9c);logger[_0x1c96('0xd')]('UpdateWhatsappQueueReport',_0x4d2c9c,JSON[_0x1c96('0xf')](_0x25db8a));_0x18b849(_0x25db8a);})['catch'](function(_0x5c7b1d){logger[_0x1c96('0x10')](_0x1c96('0x1a'),_0x5c7b1d[_0x1c96('0x12')],_0x4d2c9c);_0x289ee5(_0x24c60c[_0x1c96('0x10')](0x1f4,_0x5c7b1d[_0x1c96('0x12')]));});});};
\ No newline at end of file
+var _0xd7bf=['create','options','raw','then','CreateWhatsappQueueReport','UpdateWhatsappQueueReport','WhatsappQueueReport','update','body','where','attributes','limit','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch'];(function(_0x6cf19c,_0x2f3f02){var _0xce14f3=function(_0x474587){while(--_0x474587){_0x6cf19c['push'](_0x6cf19c['shift']());}};_0xce14f3(++_0x2f3f02);}(_0xd7bf,0x124));var _0xfd7b=function(_0x26bed2,_0xa6f8fa){_0x26bed2=_0x26bed2-0x0;var _0x21ec70=_0xd7bf[_0x26bed2];return _0x21ec70;};'use strict';var _=require('lodash');var util=require(_0xfd7b('0x0'));var moment=require(_0xfd7b('0x1'));var BPromise=require(_0xfd7b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfd7b('0x3'));var db=require(_0xfd7b('0x4'))['db'];var utils=require(_0xfd7b('0x5'));var logger=require(_0xfd7b('0x6'))(_0xfd7b('0x7'));var config=require(_0xfd7b('0x8'));var jayson=require(_0xfd7b('0x9'));var client=jayson[_0xfd7b('0xa')][_0xfd7b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24187e,_0x4d0fce,_0x495eeb){return new BPromise(function(_0x1d47af,_0x3d88c7){return client[_0xfd7b('0xc')](_0x24187e,_0x495eeb)['then'](function(_0xf07e4d){logger[_0xfd7b('0xd')](_0xfd7b('0xe'),_0x4d0fce,_0xfd7b('0xf'));logger[_0xfd7b('0x10')](_0xfd7b('0x11'),_0x4d0fce,_0xfd7b('0xf'),JSON[_0xfd7b('0x12')](_0xf07e4d));if(_0xf07e4d[_0xfd7b('0x13')]){if(_0xf07e4d['error'][_0xfd7b('0x14')]===0x1f4){logger['error'](_0xfd7b('0xe'),_0x4d0fce,_0xf07e4d[_0xfd7b('0x13')][_0xfd7b('0x15')]);return _0x3d88c7(_0xf07e4d['error'][_0xfd7b('0x15')]);}logger[_0xfd7b('0x13')](_0xfd7b('0xe'),_0x4d0fce,_0xf07e4d[_0xfd7b('0x13')][_0xfd7b('0x15')]);return _0x1d47af(_0xf07e4d[_0xfd7b('0x13')][_0xfd7b('0x15')]);}else{logger[_0xfd7b('0xd')](_0xfd7b('0xe'),_0x4d0fce,_0xfd7b('0xf'));_0x1d47af(_0xf07e4d['result'][_0xfd7b('0x15')]);}})[_0xfd7b('0x16')](function(_0x4bc744){logger[_0xfd7b('0x13')](_0xfd7b('0xe'),_0x4d0fce,_0x4bc744);_0x3d88c7(_0x4bc744);});});}exports['CreateWhatsappQueueReport']=function(_0x5dbed4){var _0x3d1462=this;return new Promise(function(_0x522307,_0x1deb0c){return db['WhatsappQueueReport'][_0xfd7b('0x17')](_0x5dbed4['body'],{'raw':_0x5dbed4[_0xfd7b('0x18')]?_0x5dbed4['options'][_0xfd7b('0x19')]===undefined?!![]:![]:!![]})[_0xfd7b('0x1a')](function(_0x218604){logger['info']('CreateWhatsappQueueReport',_0x5dbed4);logger[_0xfd7b('0x10')]('CreateWhatsappQueueReport',_0x5dbed4,JSON[_0xfd7b('0x12')](_0x218604));_0x522307(_0x218604);})[_0xfd7b('0x16')](function(_0x120aff){logger[_0xfd7b('0x13')](_0xfd7b('0x1b'),_0x120aff[_0xfd7b('0x15')],_0x5dbed4);_0x1deb0c(_0x3d1462[_0xfd7b('0x13')](0x1f4,_0x120aff[_0xfd7b('0x15')]));});});};exports[_0xfd7b('0x1c')]=function(_0x5eeacf){var _0x28ed01=this;return new Promise(function(_0x57d8db,_0x546e05){return db[_0xfd7b('0x1d')][_0xfd7b('0x1e')](_0x5eeacf[_0xfd7b('0x1f')],{'raw':_0x5eeacf[_0xfd7b('0x18')]?_0x5eeacf[_0xfd7b('0x18')][_0xfd7b('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5eeacf[_0xfd7b('0x18')]?_0x5eeacf['options'][_0xfd7b('0x20')]||null:null,'attributes':_0x5eeacf['options']?_0x5eeacf[_0xfd7b('0x18')][_0xfd7b('0x21')]||null:null,'limit':_0x5eeacf[_0xfd7b('0x18')]?_0x5eeacf[_0xfd7b('0x18')][_0xfd7b('0x22')]||null:null})[_0xfd7b('0x1a')](function(_0x4dbd41){logger['info'](_0xfd7b('0x1c'),_0x5eeacf);logger['debug'](_0xfd7b('0x1c'),_0x5eeacf,JSON[_0xfd7b('0x12')](_0x4dbd41));_0x57d8db(_0x4dbd41);})[_0xfd7b('0x16')](function(_0x463193){logger['error']('UpdateWhatsappQueueReport',_0x463193['message'],_0x5eeacf);_0x546e05(_0x28ed01[_0xfd7b('0x13')](0x1f4,_0x463193[_0xfd7b('0x15')]));});});};
\ No newline at end of file