Built motion from commit cb845558.|2.6.34
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index c517dc1..aff5ca3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c49=['bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','request','then','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','update','where','attributes','limit','UpdateWhatsappQueueReport','lodash','moment'];(function(_0x32aa8b,_0x1041d1){var _0x1a8c56=function(_0x2f87f0){while(--_0x2f87f0){_0x32aa8b['push'](_0x32aa8b['shift']());}};_0x1a8c56(++_0x1041d1);}(_0x0c49,0x13e));var _0x90c4=function(_0x6ed7f7,_0x38aabf){_0x6ed7f7=_0x6ed7f7-0x0;var _0x7fd93=_0x0c49[_0x6ed7f7];return _0x7fd93;};'use strict';var _=require(_0x90c4('0x0'));var util=require('util');var moment=require(_0x90c4('0x1'));var BPromise=require(_0x90c4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x90c4('0x3'))['db'];var utils=require(_0x90c4('0x4'));var logger=require('../../config/logger')(_0x90c4('0x5'));var config=require(_0x90c4('0x6'));var jayson=require(_0x90c4('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x146d97,_0x1e9126,_0x1e6a2e){return new BPromise(function(_0x2ebb33,_0x3f4b01){return client[_0x90c4('0x8')](_0x146d97,_0x1e6a2e)[_0x90c4('0x9')](function(_0xb9d0f2){logger[_0x90c4('0xa')](_0x90c4('0xb'),_0x1e9126,_0x90c4('0xc'));logger[_0x90c4('0xd')](_0x90c4('0xe'),_0x1e9126,'request\x20sent',JSON[_0x90c4('0xf')](_0xb9d0f2));if(_0xb9d0f2[_0x90c4('0x10')]){if(_0xb9d0f2['error'][_0x90c4('0x11')]===0x1f4){logger[_0x90c4('0x10')](_0x90c4('0xb'),_0x1e9126,_0xb9d0f2[_0x90c4('0x10')]['message']);return _0x3f4b01(_0xb9d0f2[_0x90c4('0x10')][_0x90c4('0x12')]);}logger[_0x90c4('0x10')](_0x90c4('0xb'),_0x1e9126,_0xb9d0f2[_0x90c4('0x10')][_0x90c4('0x12')]);return _0x2ebb33(_0xb9d0f2[_0x90c4('0x10')][_0x90c4('0x12')]);}else{logger[_0x90c4('0xa')](_0x90c4('0xb'),_0x1e9126,_0x90c4('0xc'));_0x2ebb33(_0xb9d0f2[_0x90c4('0x13')]['message']);}})[_0x90c4('0x14')](function(_0x20c44d){logger[_0x90c4('0x10')](_0x90c4('0xb'),_0x1e9126,_0x20c44d);_0x3f4b01(_0x20c44d);});});}exports[_0x90c4('0x15')]=function(_0x27acf7){var _0x468420=this;return new Promise(function(_0x2bfb43,_0x5c2765){return db[_0x90c4('0x16')][_0x90c4('0x17')](_0x27acf7[_0x90c4('0x18')],{'raw':_0x27acf7[_0x90c4('0x19')]?_0x27acf7[_0x90c4('0x19')][_0x90c4('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x2001af){logger[_0x90c4('0xa')](_0x90c4('0x15'),_0x27acf7);logger[_0x90c4('0xd')](_0x90c4('0x15'),_0x27acf7,JSON[_0x90c4('0xf')](_0x2001af));_0x2bfb43(_0x2001af);})[_0x90c4('0x14')](function(_0x9fd373){logger[_0x90c4('0x10')]('CreateWhatsappQueueReport',_0x9fd373[_0x90c4('0x12')],_0x27acf7);_0x5c2765(_0x468420[_0x90c4('0x10')](0x1f4,_0x9fd373[_0x90c4('0x12')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x555356){var _0x48b2b5=this;return new Promise(function(_0x3c3b40,_0x55ef2f){return db[_0x90c4('0x16')][_0x90c4('0x1b')](_0x555356[_0x90c4('0x18')],{'raw':_0x555356['options']?_0x555356[_0x90c4('0x19')][_0x90c4('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x555356['options']?_0x555356[_0x90c4('0x19')][_0x90c4('0x1c')]||null:null,'attributes':_0x555356[_0x90c4('0x19')]?_0x555356[_0x90c4('0x19')][_0x90c4('0x1d')]||null:null,'limit':_0x555356[_0x90c4('0x19')]?_0x555356['options'][_0x90c4('0x1e')]||null:null})['then'](function(_0x1a778a){logger[_0x90c4('0xa')](_0x90c4('0x1f'),_0x555356);logger['debug'](_0x90c4('0x1f'),_0x555356,JSON[_0x90c4('0xf')](_0x1a778a));_0x3c3b40(_0x1a778a);})[_0x90c4('0x14')](function(_0x48d25b){logger[_0x90c4('0x10')](_0x90c4('0x1f'),_0x48d25b[_0x90c4('0x12')],_0x555356);_0x55ef2f(_0x48b2b5['error'](0x1f4,_0x48d25b[_0x90c4('0x12')]));});});};
\ No newline at end of file
+var _0x90f0=['raw','CreateWhatsappQueueReport','stringify','catch','update','where','attributes','limit','UpdateWhatsappQueueReport','lodash','bluebird','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','WhatsappQueueReport','body','options'];(function(_0x57cb4f,_0x541f57){var _0x29bb45=function(_0x462bee){while(--_0x462bee){_0x57cb4f['push'](_0x57cb4f['shift']());}};_0x29bb45(++_0x541f57);}(_0x90f0,0x19f));var _0x090f=function(_0x430678,_0x50ccc2){_0x430678=_0x430678-0x0;var _0xca6e8b=_0x90f0[_0x430678];return _0xca6e8b;};'use strict';var _=require(_0x090f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x090f('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x090f('0x2'));var logger=require('../../config/logger')(_0x090f('0x3'));var config=require(_0x090f('0x4'));var jayson=require(_0x090f('0x5'));var client=jayson[_0x090f('0x6')][_0x090f('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x250ed1,_0x374e61,_0x46df1c){return new BPromise(function(_0x4b87b1,_0x2f0fe5){return client['request'](_0x250ed1,_0x46df1c)[_0x090f('0x8')](function(_0x42f840){logger[_0x090f('0x9')](_0x090f('0xa'),_0x374e61,_0x090f('0xb'));logger[_0x090f('0xc')]('WhatsappQueueReport,\x20%s,\x20%s,\x20%s',_0x374e61,_0x090f('0xb'),JSON['stringify'](_0x42f840));if(_0x42f840[_0x090f('0xd')]){if(_0x42f840[_0x090f('0xd')][_0x090f('0xe')]===0x1f4){logger['error'](_0x090f('0xa'),_0x374e61,_0x42f840[_0x090f('0xd')]['message']);return _0x2f0fe5(_0x42f840[_0x090f('0xd')][_0x090f('0xf')]);}logger['error'](_0x090f('0xa'),_0x374e61,_0x42f840[_0x090f('0xd')][_0x090f('0xf')]);return _0x4b87b1(_0x42f840[_0x090f('0xd')]['message']);}else{logger['info'](_0x090f('0xa'),_0x374e61,_0x090f('0xb'));_0x4b87b1(_0x42f840[_0x090f('0x10')][_0x090f('0xf')]);}})['catch'](function(_0x54d9f1){logger['error']('WhatsappQueueReport,\x20%s,\x20%s',_0x374e61,_0x54d9f1);_0x2f0fe5(_0x54d9f1);});});}exports['CreateWhatsappQueueReport']=function(_0x5e09a5){var _0x8537a3=this;return new Promise(function(_0x536dcd,_0x31d0f3){return db[_0x090f('0x11')]['create'](_0x5e09a5[_0x090f('0x12')],{'raw':_0x5e09a5['options']?_0x5e09a5[_0x090f('0x13')][_0x090f('0x14')]===undefined?!![]:![]:!![]})[_0x090f('0x8')](function(_0x48d8e0){logger[_0x090f('0x9')](_0x090f('0x15'),_0x5e09a5);logger[_0x090f('0xc')](_0x090f('0x15'),_0x5e09a5,JSON[_0x090f('0x16')](_0x48d8e0));_0x536dcd(_0x48d8e0);})[_0x090f('0x17')](function(_0x212104){logger['error'](_0x090f('0x15'),_0x212104[_0x090f('0xf')],_0x5e09a5);_0x31d0f3(_0x8537a3[_0x090f('0xd')](0x1f4,_0x212104[_0x090f('0xf')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x46993a){var _0x2a8a9e=this;return new Promise(function(_0x32f448,_0x4e0e19){return db[_0x090f('0x11')][_0x090f('0x18')](_0x46993a[_0x090f('0x12')],{'raw':_0x46993a[_0x090f('0x13')]?_0x46993a[_0x090f('0x13')][_0x090f('0x14')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x46993a['options']?_0x46993a['options'][_0x090f('0x19')]||null:null,'attributes':_0x46993a[_0x090f('0x13')]?_0x46993a[_0x090f('0x13')][_0x090f('0x1a')]||null:null,'limit':_0x46993a['options']?_0x46993a['options'][_0x090f('0x1b')]||null:null})[_0x090f('0x8')](function(_0x527d4d){logger[_0x090f('0x9')]('UpdateWhatsappQueueReport',_0x46993a);logger[_0x090f('0xc')](_0x090f('0x1c'),_0x46993a,JSON[_0x090f('0x16')](_0x527d4d));_0x32f448(_0x527d4d);})[_0x090f('0x17')](function(_0x48d397){logger[_0x090f('0xd')](_0x090f('0x1c'),_0x48d397[_0x090f('0xf')],_0x46993a);_0x4e0e19(_0x2a8a9e[_0x090f('0xd')](0x1f4,_0x48d397[_0x090f('0xf')]));});});};
\ No newline at end of file