Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index b035f09..d71a151 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6885=['util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','debug','stringify','UpdateWhatsappQueueReport','where','attributes','limit','lodash'];(function(_0x5589bd,_0x4e70e9){var _0x3f68a8=function(_0x29597f){while(--_0x29597f){_0x5589bd['push'](_0x5589bd['shift']());}};_0x3f68a8(++_0x4e70e9);}(_0x6885,0x180));var _0x5688=function(_0x4b9300,_0x4a2afc){_0x4b9300=_0x4b9300-0x0;var _0x5a1361=_0x6885[_0x4b9300];return _0x5a1361;};'use strict';var _=require(_0x5688('0x0'));var util=require(_0x5688('0x1'));var moment=require('moment');var BPromise=require(_0x5688('0x2'));var rs=require(_0x5688('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5688('0x4'))['db'];var utils=require(_0x5688('0x5'));var logger=require(_0x5688('0x6'))(_0x5688('0x7'));var config=require(_0x5688('0x8'));var jayson=require(_0x5688('0x9'));var client=jayson[_0x5688('0xa')][_0x5688('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x265aa4,_0x2de5a3,_0x298bb2){return new BPromise(function(_0x4c8de4,_0xc20b5a){return client[_0x5688('0xc')](_0x265aa4,_0x298bb2)[_0x5688('0xd')](function(_0x24018b){logger[_0x5688('0xe')](_0x5688('0xf'),_0x2de5a3,_0x5688('0x10'));logger['debug'](_0x5688('0x11'),_0x2de5a3,_0x5688('0x10'),JSON['stringify'](_0x24018b));if(_0x24018b['error']){if(_0x24018b[_0x5688('0x12')][_0x5688('0x13')]===0x1f4){logger[_0x5688('0x12')](_0x5688('0xf'),_0x2de5a3,_0x24018b[_0x5688('0x12')][_0x5688('0x14')]);return _0xc20b5a(_0x24018b[_0x5688('0x12')]['message']);}logger['error'](_0x5688('0xf'),_0x2de5a3,_0x24018b[_0x5688('0x12')][_0x5688('0x14')]);return _0x4c8de4(_0x24018b[_0x5688('0x12')]['message']);}else{logger['info']('WhatsappQueueReport,\x20%s,\x20%s',_0x2de5a3,_0x5688('0x10'));_0x4c8de4(_0x24018b[_0x5688('0x15')][_0x5688('0x14')]);}})[_0x5688('0x16')](function(_0x5ae36f){logger[_0x5688('0x12')]('WhatsappQueueReport,\x20%s,\x20%s',_0x2de5a3,_0x5ae36f);_0xc20b5a(_0x5ae36f);});});}exports[_0x5688('0x17')]=function(_0x171bb){var _0x4aad55=this;return new Promise(function(_0xc6a121,_0x29775d){return db[_0x5688('0x18')][_0x5688('0x19')](_0x171bb[_0x5688('0x1a')],{'raw':_0x171bb['options']?_0x171bb[_0x5688('0x1b')][_0x5688('0x1c')]===undefined?!![]:![]:!![]})[_0x5688('0xd')](function(_0x2c9b92){logger[_0x5688('0xe')](_0x5688('0x17'),_0x171bb);logger[_0x5688('0x1d')](_0x5688('0x17'),_0x171bb,JSON[_0x5688('0x1e')](_0x2c9b92));_0xc6a121(_0x2c9b92);})[_0x5688('0x16')](function(_0x30eb68){logger[_0x5688('0x12')](_0x5688('0x17'),_0x30eb68[_0x5688('0x14')],_0x171bb);_0x29775d(_0x4aad55[_0x5688('0x12')](0x1f4,_0x30eb68['message']));});});};exports[_0x5688('0x1f')]=function(_0x7b8032){var _0x335f85=this;return new Promise(function(_0x2182c4,_0x2fe847){return db[_0x5688('0x18')]['update'](_0x7b8032['body'],{'raw':_0x7b8032[_0x5688('0x1b')]?_0x7b8032['options'][_0x5688('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x7b8032[_0x5688('0x1b')]?_0x7b8032[_0x5688('0x1b')][_0x5688('0x20')]||null:null,'attributes':_0x7b8032[_0x5688('0x1b')]?_0x7b8032[_0x5688('0x1b')][_0x5688('0x21')]||null:null,'limit':_0x7b8032[_0x5688('0x1b')]?_0x7b8032[_0x5688('0x1b')][_0x5688('0x22')]||null:null})[_0x5688('0xd')](function(_0x32a414){logger[_0x5688('0xe')]('UpdateWhatsappQueueReport',_0x7b8032);logger['debug'](_0x5688('0x1f'),_0x7b8032,JSON[_0x5688('0x1e')](_0x32a414));_0x2182c4(_0x32a414);})['catch'](function(_0x51f1fa){logger[_0x5688('0x12')](_0x5688('0x1f'),_0x51f1fa[_0x5688('0x14')],_0x7b8032);_0x2fe847(_0x335f85[_0x5688('0x12')](0x1f4,_0x51f1fa[_0x5688('0x14')]));});});};
\ No newline at end of file
+var _0x7cc9=['../../config/logger','rpc','../../config/environment','jayson/promise','then','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','UpdateWhatsappQueueReport','attributes','limit','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x7cc9,0x16d));var _0x97cc=function(_0x21aa5b,_0x2c808f){_0x21aa5b=_0x21aa5b-0x0;var _0x2ca4c8=_0x7cc9[_0x21aa5b];return _0x2ca4c8;};'use strict';var _=require(_0x97cc('0x0'));var util=require('util');var moment=require(_0x97cc('0x1'));var BPromise=require(_0x97cc('0x2'));var rs=require(_0x97cc('0x3'));var fs=require('fs');var Redis=require(_0x97cc('0x4'));var db=require(_0x97cc('0x5'))['db'];var utils=require(_0x97cc('0x6'));var logger=require(_0x97cc('0x7'))(_0x97cc('0x8'));var config=require(_0x97cc('0x9'));var jayson=require(_0x97cc('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1796de,_0xf17ed2,_0x3f1d94){return new BPromise(function(_0x454a8a,_0x24dec2){return client['request'](_0x1796de,_0x3f1d94)[_0x97cc('0xb')](function(_0x3eefd9){logger[_0x97cc('0xc')](_0x97cc('0xd'),_0xf17ed2,_0x97cc('0xe'));logger[_0x97cc('0xf')](_0x97cc('0x10'),_0xf17ed2,_0x97cc('0xe'),JSON[_0x97cc('0x11')](_0x3eefd9));if(_0x3eefd9[_0x97cc('0x12')]){if(_0x3eefd9[_0x97cc('0x12')]['code']===0x1f4){logger['error'](_0x97cc('0xd'),_0xf17ed2,_0x3eefd9[_0x97cc('0x12')][_0x97cc('0x13')]);return _0x24dec2(_0x3eefd9[_0x97cc('0x12')][_0x97cc('0x13')]);}logger['error'](_0x97cc('0xd'),_0xf17ed2,_0x3eefd9[_0x97cc('0x12')][_0x97cc('0x13')]);return _0x454a8a(_0x3eefd9['error'][_0x97cc('0x13')]);}else{logger['info'](_0x97cc('0xd'),_0xf17ed2,_0x97cc('0xe'));_0x454a8a(_0x3eefd9[_0x97cc('0x14')][_0x97cc('0x13')]);}})['catch'](function(_0x4f8526){logger[_0x97cc('0x12')]('WhatsappQueueReport,\x20%s,\x20%s',_0xf17ed2,_0x4f8526);_0x24dec2(_0x4f8526);});});}exports[_0x97cc('0x15')]=function(_0x390b71){var _0x5cca65=this;return new Promise(function(_0x38fdf5,_0x3985c2){return db[_0x97cc('0x16')][_0x97cc('0x17')](_0x390b71[_0x97cc('0x18')],{'raw':_0x390b71[_0x97cc('0x19')]?_0x390b71[_0x97cc('0x19')][_0x97cc('0x1a')]===undefined?!![]:![]:!![]})[_0x97cc('0xb')](function(_0x225b48){logger[_0x97cc('0xc')](_0x97cc('0x15'),_0x390b71);logger[_0x97cc('0xf')]('CreateWhatsappQueueReport',_0x390b71,JSON[_0x97cc('0x11')](_0x225b48));_0x38fdf5(_0x225b48);})['catch'](function(_0x23ab4a){logger[_0x97cc('0x12')](_0x97cc('0x15'),_0x23ab4a[_0x97cc('0x13')],_0x390b71);_0x3985c2(_0x5cca65[_0x97cc('0x12')](0x1f4,_0x23ab4a[_0x97cc('0x13')]));});});};exports[_0x97cc('0x1b')]=function(_0x1e4496){var _0x33c932=this;return new Promise(function(_0x2ba4fa,_0xac2f4a){return db[_0x97cc('0x16')]['update'](_0x1e4496[_0x97cc('0x18')],{'raw':_0x1e4496[_0x97cc('0x19')]?_0x1e4496[_0x97cc('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1e4496[_0x97cc('0x19')]?_0x1e4496[_0x97cc('0x19')]['where']||null:null,'attributes':_0x1e4496[_0x97cc('0x19')]?_0x1e4496[_0x97cc('0x19')][_0x97cc('0x1c')]||null:null,'limit':_0x1e4496[_0x97cc('0x19')]?_0x1e4496['options'][_0x97cc('0x1d')]||null:null})[_0x97cc('0xb')](function(_0xdc394c){logger['info'](_0x97cc('0x1b'),_0x1e4496);logger['debug']('UpdateWhatsappQueueReport',_0x1e4496,JSON[_0x97cc('0x11')](_0xdc394c));_0x2ba4fa(_0xdc394c);})[_0x97cc('0x1e')](function(_0x31c941){logger[_0x97cc('0x12')](_0x97cc('0x1b'),_0x31c941[_0x97cc('0x13')],_0x1e4496);_0xac2f4a(_0x33c932[_0x97cc('0x12')](0x1f4,_0x31c941[_0x97cc('0x13')]));});});};
\ No newline at end of file