Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index 415dd2a..71b81fe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4f4=['attributes','limit','UpdateWhatsappQueueReport','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','then','debug','update'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0xf4f4,0x12c));var _0x4f4f=function(_0x38517b,_0x2c26fa){_0x38517b=_0x38517b-0x0;var _0x3b1976=_0xf4f4[_0x38517b];return _0x3b1976;};'use strict';var _=require(_0x4f4f('0x0'));var util=require(_0x4f4f('0x1'));var moment=require(_0x4f4f('0x2'));var BPromise=require(_0x4f4f('0x3'));var rs=require(_0x4f4f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4f4f('0x5'))['db'];var utils=require(_0x4f4f('0x6'));var logger=require(_0x4f4f('0x7'))(_0x4f4f('0x8'));var config=require(_0x4f4f('0x9'));var jayson=require(_0x4f4f('0xa'));var client=jayson['client'][_0x4f4f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x21d829,_0x2b1f64,_0x5788e0){return new BPromise(function(_0x3947c7,_0x2e83fa){return client['request'](_0x21d829,_0x5788e0)['then'](function(_0x3dbbb8){logger[_0x4f4f('0xc')](_0x4f4f('0xd'),_0x2b1f64,_0x4f4f('0xe'));logger['debug'](_0x4f4f('0xf'),_0x2b1f64,_0x4f4f('0xe'),JSON[_0x4f4f('0x10')](_0x3dbbb8));if(_0x3dbbb8[_0x4f4f('0x11')]){if(_0x3dbbb8[_0x4f4f('0x11')][_0x4f4f('0x12')]===0x1f4){logger[_0x4f4f('0x11')](_0x4f4f('0xd'),_0x2b1f64,_0x3dbbb8[_0x4f4f('0x11')]['message']);return _0x2e83fa(_0x3dbbb8[_0x4f4f('0x11')][_0x4f4f('0x13')]);}logger['error'](_0x4f4f('0xd'),_0x2b1f64,_0x3dbbb8[_0x4f4f('0x11')]['message']);return _0x3947c7(_0x3dbbb8[_0x4f4f('0x11')]['message']);}else{logger[_0x4f4f('0xc')](_0x4f4f('0xd'),_0x2b1f64,_0x4f4f('0xe'));_0x3947c7(_0x3dbbb8['result'][_0x4f4f('0x13')]);}})[_0x4f4f('0x14')](function(_0x4e2050){logger[_0x4f4f('0x11')](_0x4f4f('0xd'),_0x2b1f64,_0x4e2050);_0x2e83fa(_0x4e2050);});});}exports[_0x4f4f('0x15')]=function(_0x1a42c9){var _0x4f5429=this;return new Promise(function(_0x48718f,_0x8fa1bb){return db[_0x4f4f('0x16')][_0x4f4f('0x17')](_0x1a42c9[_0x4f4f('0x18')],{'raw':_0x1a42c9[_0x4f4f('0x19')]?_0x1a42c9['options'][_0x4f4f('0x1a')]===undefined?!![]:![]:!![]})[_0x4f4f('0x1b')](function(_0x3f098f){logger['info']('CreateWhatsappQueueReport',_0x1a42c9);logger[_0x4f4f('0x1c')](_0x4f4f('0x15'),_0x1a42c9,JSON[_0x4f4f('0x10')](_0x3f098f));_0x48718f(_0x3f098f);})[_0x4f4f('0x14')](function(_0x1709e6){logger['error']('CreateWhatsappQueueReport',_0x1709e6[_0x4f4f('0x13')],_0x1a42c9);_0x8fa1bb(_0x4f5429[_0x4f4f('0x11')](0x1f4,_0x1709e6[_0x4f4f('0x13')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x1fdf60){var _0x15735d=this;return new Promise(function(_0x2a118a,_0x413742){return db[_0x4f4f('0x16')][_0x4f4f('0x1d')](_0x1fdf60[_0x4f4f('0x18')],{'raw':_0x1fdf60['options']?_0x1fdf60['options'][_0x4f4f('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1fdf60[_0x4f4f('0x19')]?_0x1fdf60[_0x4f4f('0x19')]['where']||null:null,'attributes':_0x1fdf60[_0x4f4f('0x19')]?_0x1fdf60['options'][_0x4f4f('0x1e')]||null:null,'limit':_0x1fdf60[_0x4f4f('0x19')]?_0x1fdf60[_0x4f4f('0x19')][_0x4f4f('0x1f')]||null:null})[_0x4f4f('0x1b')](function(_0x493920){logger['info'](_0x4f4f('0x20'),_0x1fdf60);logger[_0x4f4f('0x1c')](_0x4f4f('0x20'),_0x1fdf60,JSON[_0x4f4f('0x10')](_0x493920));_0x2a118a(_0x493920);})[_0x4f4f('0x14')](function(_0x330fb5){logger[_0x4f4f('0x11')]('UpdateWhatsappQueueReport',_0x330fb5[_0x4f4f('0x13')],_0x1fdf60);_0x413742(_0x15735d['error'](0x1f4,_0x330fb5[_0x4f4f('0x13')]));});});};
\ No newline at end of file
+var _0x16f3=['bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','info','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','WhatsappQueueReport,\x20%s,\x20%s','message','result','WhatsappQueueReport','create','body','options','then','CreateWhatsappQueueReport','debug','catch','update','where','attributes','UpdateWhatsappQueueReport','lodash','moment'];(function(_0x5b70c7,_0x36448d){var _0x574120=function(_0x7c02b6){while(--_0x7c02b6){_0x5b70c7['push'](_0x5b70c7['shift']());}};_0x574120(++_0x36448d);}(_0x16f3,0x191));var _0x316f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x16f3[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x316f('0x0'));var util=require('util');var moment=require(_0x316f('0x1'));var BPromise=require(_0x316f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x316f('0x3'));var db=require(_0x316f('0x4'))['db'];var utils=require(_0x316f('0x5'));var logger=require('../../config/logger')(_0x316f('0x6'));var config=require(_0x316f('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x316f('0x8')][_0x316f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3d48b5,_0x22df63,_0x2669e7){return new BPromise(function(_0x2f2fb9,_0x4d05c0){return client['request'](_0x3d48b5,_0x2669e7)['then'](function(_0x5212d7){logger[_0x316f('0xa')]('WhatsappQueueReport,\x20%s,\x20%s',_0x22df63,'request\x20sent');logger['debug'](_0x316f('0xb'),_0x22df63,_0x316f('0xc'),JSON[_0x316f('0xd')](_0x5212d7));if(_0x5212d7[_0x316f('0xe')]){if(_0x5212d7[_0x316f('0xe')][_0x316f('0xf')]===0x1f4){logger[_0x316f('0xe')](_0x316f('0x10'),_0x22df63,_0x5212d7[_0x316f('0xe')]['message']);return _0x4d05c0(_0x5212d7['error'][_0x316f('0x11')]);}logger[_0x316f('0xe')](_0x316f('0x10'),_0x22df63,_0x5212d7[_0x316f('0xe')]['message']);return _0x2f2fb9(_0x5212d7[_0x316f('0xe')][_0x316f('0x11')]);}else{logger[_0x316f('0xa')]('WhatsappQueueReport,\x20%s,\x20%s',_0x22df63,_0x316f('0xc'));_0x2f2fb9(_0x5212d7[_0x316f('0x12')][_0x316f('0x11')]);}})['catch'](function(_0xcccaae){logger[_0x316f('0xe')]('WhatsappQueueReport,\x20%s,\x20%s',_0x22df63,_0xcccaae);_0x4d05c0(_0xcccaae);});});}exports['CreateWhatsappQueueReport']=function(_0x1ecbcc){var _0x1e6537=this;return new Promise(function(_0x59b9cc,_0x5ad706){return db[_0x316f('0x13')][_0x316f('0x14')](_0x1ecbcc[_0x316f('0x15')],{'raw':_0x1ecbcc[_0x316f('0x16')]?_0x1ecbcc[_0x316f('0x16')]['raw']===undefined?!![]:![]:!![]})[_0x316f('0x17')](function(_0x2d6da2){logger[_0x316f('0xa')](_0x316f('0x18'),_0x1ecbcc);logger[_0x316f('0x19')](_0x316f('0x18'),_0x1ecbcc,JSON[_0x316f('0xd')](_0x2d6da2));_0x59b9cc(_0x2d6da2);})[_0x316f('0x1a')](function(_0x17b854){logger[_0x316f('0xe')](_0x316f('0x18'),_0x17b854[_0x316f('0x11')],_0x1ecbcc);_0x5ad706(_0x1e6537['error'](0x1f4,_0x17b854[_0x316f('0x11')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x1c222b){var _0x1dfdcd=this;return new Promise(function(_0x20483c,_0x3b3213){return db[_0x316f('0x13')][_0x316f('0x1b')](_0x1c222b[_0x316f('0x15')],{'raw':_0x1c222b[_0x316f('0x16')]?_0x1c222b['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1c222b[_0x316f('0x16')]?_0x1c222b[_0x316f('0x16')][_0x316f('0x1c')]||null:null,'attributes':_0x1c222b[_0x316f('0x16')]?_0x1c222b['options'][_0x316f('0x1d')]||null:null,'limit':_0x1c222b[_0x316f('0x16')]?_0x1c222b['options']['limit']||null:null})['then'](function(_0x2e878b){logger[_0x316f('0xa')](_0x316f('0x1e'),_0x1c222b);logger['debug'](_0x316f('0x1e'),_0x1c222b,JSON[_0x316f('0xd')](_0x2e878b));_0x20483c(_0x2e878b);})[_0x316f('0x1a')](function(_0x275d0b){logger['error'](_0x316f('0x1e'),_0x275d0b['message'],_0x1c222b);_0x3b3213(_0x1dfdcd[_0x316f('0xe')](0x1f4,_0x275d0b[_0x316f('0x11')]));});});};
\ No newline at end of file