Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index 1cd47b6..f42cd19 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f03=['then','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','where','attributes','limit','UpdateWhatsappQueueReport','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request'];(function(_0x482c5c,_0x5d8108){var _0x10826a=function(_0x2f02ad){while(--_0x2f02ad){_0x482c5c['push'](_0x482c5c['shift']());}};_0x10826a(++_0x5d8108);}(_0x4f03,0xb6));var _0x34f0=function(_0x536068,_0x3de52c){_0x536068=_0x536068-0x0;var _0x4a5db2=_0x4f03[_0x536068];return _0x4a5db2;};'use strict';var _=require('lodash');var util=require(_0x34f0('0x0'));var moment=require(_0x34f0('0x1'));var BPromise=require(_0x34f0('0x2'));var rs=require(_0x34f0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x34f0('0x4'))['db'];var utils=require(_0x34f0('0x5'));var logger=require(_0x34f0('0x6'))('rpc');var config=require(_0x34f0('0x7'));var jayson=require(_0x34f0('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x233b54,_0x329a5f,_0xc7a87c){return new BPromise(function(_0xb22892,_0x5e8ccd){return client[_0x34f0('0x9')](_0x233b54,_0xc7a87c)[_0x34f0('0xa')](function(_0x33c2a1){logger['info'](_0x34f0('0xb'),_0x329a5f,_0x34f0('0xc'));logger[_0x34f0('0xd')](_0x34f0('0xe'),_0x329a5f,_0x34f0('0xc'),JSON[_0x34f0('0xf')](_0x33c2a1));if(_0x33c2a1['error']){if(_0x33c2a1['error'][_0x34f0('0x10')]===0x1f4){logger[_0x34f0('0x11')](_0x34f0('0xb'),_0x329a5f,_0x33c2a1[_0x34f0('0x11')][_0x34f0('0x12')]);return _0x5e8ccd(_0x33c2a1['error'][_0x34f0('0x12')]);}logger[_0x34f0('0x11')]('WhatsappQueueReport,\x20%s,\x20%s',_0x329a5f,_0x33c2a1[_0x34f0('0x11')]['message']);return _0xb22892(_0x33c2a1[_0x34f0('0x11')][_0x34f0('0x12')]);}else{logger[_0x34f0('0x13')]('WhatsappQueueReport,\x20%s,\x20%s',_0x329a5f,_0x34f0('0xc'));_0xb22892(_0x33c2a1[_0x34f0('0x14')][_0x34f0('0x12')]);}})[_0x34f0('0x15')](function(_0x3b1ffb){logger['error'](_0x34f0('0xb'),_0x329a5f,_0x3b1ffb);_0x5e8ccd(_0x3b1ffb);});});}exports[_0x34f0('0x16')]=function(_0x511323){var _0x2a6c71=this;return new Promise(function(_0x19ffc3,_0x58046c){return db[_0x34f0('0x17')][_0x34f0('0x18')](_0x511323[_0x34f0('0x19')],{'raw':_0x511323[_0x34f0('0x1a')]?_0x511323['options'][_0x34f0('0x1b')]===undefined?!![]:![]:!![]})[_0x34f0('0xa')](function(_0x1e40ff){logger['info'](_0x34f0('0x16'),_0x511323);logger[_0x34f0('0xd')](_0x34f0('0x16'),_0x511323,JSON[_0x34f0('0xf')](_0x1e40ff));_0x19ffc3(_0x1e40ff);})[_0x34f0('0x15')](function(_0x210a97){logger[_0x34f0('0x11')]('CreateWhatsappQueueReport',_0x210a97[_0x34f0('0x12')],_0x511323);_0x58046c(_0x2a6c71[_0x34f0('0x11')](0x1f4,_0x210a97[_0x34f0('0x12')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x3f85c7){var _0x420003=this;return new Promise(function(_0x5a9c20,_0x4475e5){return db['WhatsappQueueReport']['update'](_0x3f85c7['body'],{'raw':_0x3f85c7[_0x34f0('0x1a')]?_0x3f85c7[_0x34f0('0x1a')][_0x34f0('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f85c7[_0x34f0('0x1a')]?_0x3f85c7['options'][_0x34f0('0x1c')]||null:null,'attributes':_0x3f85c7[_0x34f0('0x1a')]?_0x3f85c7['options'][_0x34f0('0x1d')]||null:null,'limit':_0x3f85c7[_0x34f0('0x1a')]?_0x3f85c7['options'][_0x34f0('0x1e')]||null:null})[_0x34f0('0xa')](function(_0xa0eb2c){logger[_0x34f0('0x13')](_0x34f0('0x1f'),_0x3f85c7);logger['debug'](_0x34f0('0x1f'),_0x3f85c7,JSON[_0x34f0('0xf')](_0xa0eb2c));_0x5a9c20(_0xa0eb2c);})[_0x34f0('0x15')](function(_0x2bc180){logger[_0x34f0('0x11')](_0x34f0('0x1f'),_0x2bc180['message'],_0x3f85c7);_0x4475e5(_0x420003[_0x34f0('0x11')](0x1f4,_0x2bc180[_0x34f0('0x12')]));});});};
\ No newline at end of file
+var _0x0c80=['message','WhatsappQueueReport,\x20%s,\x20%s','result','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','debug','stringify','catch','UpdateWhatsappQueueReport','update','where','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','then','info','request\x20sent','error'];(function(_0x52e327,_0x216876){var _0x428844=function(_0x5abcbe){while(--_0x5abcbe){_0x52e327['push'](_0x52e327['shift']());}};_0x428844(++_0x216876);}(_0x0c80,0x159));var _0x00c8=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0x0c80[_0x5d2803];return _0xdcad2c;};'use strict';var _=require(_0x00c8('0x0'));var util=require(_0x00c8('0x1'));var moment=require(_0x00c8('0x2'));var BPromise=require(_0x00c8('0x3'));var rs=require(_0x00c8('0x4'));var fs=require('fs');var Redis=require(_0x00c8('0x5'));var db=require(_0x00c8('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x00c8('0x7'))('rpc');var config=require(_0x00c8('0x8'));var jayson=require(_0x00c8('0x9'));var client=jayson[_0x00c8('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5d8cbe,_0x8271e6,_0x495d21){return new BPromise(function(_0x33fbe3,_0x52a733){return client['request'](_0x5d8cbe,_0x495d21)[_0x00c8('0xb')](function(_0x46313c){logger[_0x00c8('0xc')]('WhatsappQueueReport,\x20%s,\x20%s',_0x8271e6,'request\x20sent');logger['debug']('WhatsappQueueReport,\x20%s,\x20%s,\x20%s',_0x8271e6,_0x00c8('0xd'),JSON['stringify'](_0x46313c));if(_0x46313c[_0x00c8('0xe')]){if(_0x46313c[_0x00c8('0xe')]['code']===0x1f4){logger[_0x00c8('0xe')]('WhatsappQueueReport,\x20%s,\x20%s',_0x8271e6,_0x46313c['error']['message']);return _0x52a733(_0x46313c[_0x00c8('0xe')][_0x00c8('0xf')]);}logger[_0x00c8('0xe')](_0x00c8('0x10'),_0x8271e6,_0x46313c['error']['message']);return _0x33fbe3(_0x46313c[_0x00c8('0xe')][_0x00c8('0xf')]);}else{logger[_0x00c8('0xc')](_0x00c8('0x10'),_0x8271e6,_0x00c8('0xd'));_0x33fbe3(_0x46313c[_0x00c8('0x11')][_0x00c8('0xf')]);}})['catch'](function(_0x33f40d){logger[_0x00c8('0xe')]('WhatsappQueueReport,\x20%s,\x20%s',_0x8271e6,_0x33f40d);_0x52a733(_0x33f40d);});});}exports[_0x00c8('0x12')]=function(_0x4cf6a0){var _0x4b5201=this;return new Promise(function(_0x48f661,_0x455f93){return db[_0x00c8('0x13')][_0x00c8('0x14')](_0x4cf6a0[_0x00c8('0x15')],{'raw':_0x4cf6a0[_0x00c8('0x16')]?_0x4cf6a0[_0x00c8('0x16')][_0x00c8('0x17')]===undefined?!![]:![]:!![]})[_0x00c8('0xb')](function(_0x5eeed4){logger[_0x00c8('0xc')](_0x00c8('0x12'),_0x4cf6a0);logger[_0x00c8('0x18')](_0x00c8('0x12'),_0x4cf6a0,JSON[_0x00c8('0x19')](_0x5eeed4));_0x48f661(_0x5eeed4);})[_0x00c8('0x1a')](function(_0x2931cd){logger[_0x00c8('0xe')](_0x00c8('0x12'),_0x2931cd['message'],_0x4cf6a0);_0x455f93(_0x4b5201[_0x00c8('0xe')](0x1f4,_0x2931cd[_0x00c8('0xf')]));});});};exports[_0x00c8('0x1b')]=function(_0x13e146){var _0x4a9fb0=this;return new Promise(function(_0x5e5cdf,_0x33e722){return db[_0x00c8('0x13')][_0x00c8('0x1c')](_0x13e146[_0x00c8('0x15')],{'raw':_0x13e146[_0x00c8('0x16')]?_0x13e146[_0x00c8('0x16')][_0x00c8('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x13e146[_0x00c8('0x16')]?_0x13e146[_0x00c8('0x16')][_0x00c8('0x1d')]||null:null,'attributes':_0x13e146[_0x00c8('0x16')]?_0x13e146['options']['attributes']||null:null,'limit':_0x13e146[_0x00c8('0x16')]?_0x13e146['options']['limit']||null:null})['then'](function(_0x8aa0e5){logger[_0x00c8('0xc')](_0x00c8('0x1b'),_0x13e146);logger[_0x00c8('0x18')](_0x00c8('0x1b'),_0x13e146,JSON[_0x00c8('0x19')](_0x8aa0e5));_0x5e5cdf(_0x8aa0e5);})[_0x00c8('0x1a')](function(_0x15213f){logger[_0x00c8('0xe')](_0x00c8('0x1b'),_0x15213f['message'],_0x13e146);_0x33e722(_0x4a9fb0['error'](0x1f4,_0x15213f[_0x00c8('0xf')]));});});};
\ No newline at end of file