Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index ca91e13..744eb78 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6760=['raw','CreateWhatsappQueueReport','stringify','UpdateWhatsappQueueReport','WhatsappQueueReport','update','attributes','limit','catch','lodash','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','info','WhatsappQueueReport,\x20%s,\x20%s','result','create','body','options'];(function(_0x10c16f,_0x29daf3){var _0x410ba2=function(_0x1c0ccb){while(--_0x1c0ccb){_0x10c16f['push'](_0x10c16f['shift']());}};_0x410ba2(++_0x29daf3);}(_0x6760,0x1d7));var _0x0676=function(_0x3060bd,_0x21635b){_0x3060bd=_0x3060bd-0x0;var _0x52d0f0=_0x6760[_0x3060bd];return _0x52d0f0;};'use strict';var _=require(_0x0676('0x0'));var util=require('util');var moment=require(_0x0676('0x1'));var BPromise=require('bluebird');var rs=require(_0x0676('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0676('0x3'))['db'];var utils=require(_0x0676('0x4'));var logger=require('../../config/logger')(_0x0676('0x5'));var config=require(_0x0676('0x6'));var jayson=require(_0x0676('0x7'));var client=jayson[_0x0676('0x8')][_0x0676('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4976a6,_0x1487ff,_0x510861){return new BPromise(function(_0x44af78,_0x49769e){return client[_0x0676('0xa')](_0x4976a6,_0x510861)[_0x0676('0xb')](function(_0x2b220d){logger['info']('WhatsappQueueReport,\x20%s,\x20%s',_0x1487ff,_0x0676('0xc'));logger[_0x0676('0xd')](_0x0676('0xe'),_0x1487ff,'request\x20sent',JSON['stringify'](_0x2b220d));if(_0x2b220d[_0x0676('0xf')]){if(_0x2b220d[_0x0676('0xf')][_0x0676('0x10')]===0x1f4){logger[_0x0676('0xf')]('WhatsappQueueReport,\x20%s,\x20%s',_0x1487ff,_0x2b220d['error'][_0x0676('0x11')]);return _0x49769e(_0x2b220d[_0x0676('0xf')][_0x0676('0x11')]);}logger[_0x0676('0xf')]('WhatsappQueueReport,\x20%s,\x20%s',_0x1487ff,_0x2b220d[_0x0676('0xf')][_0x0676('0x11')]);return _0x44af78(_0x2b220d['error'][_0x0676('0x11')]);}else{logger[_0x0676('0x12')](_0x0676('0x13'),_0x1487ff,_0x0676('0xc'));_0x44af78(_0x2b220d[_0x0676('0x14')][_0x0676('0x11')]);}})['catch'](function(_0x500c6f){logger[_0x0676('0xf')](_0x0676('0x13'),_0x1487ff,_0x500c6f);_0x49769e(_0x500c6f);});});}exports['CreateWhatsappQueueReport']=function(_0x3e7169){var _0x1a1c89=this;return new Promise(function(_0x406589,_0x18ab0b){return db['WhatsappQueueReport'][_0x0676('0x15')](_0x3e7169[_0x0676('0x16')],{'raw':_0x3e7169[_0x0676('0x17')]?_0x3e7169[_0x0676('0x17')][_0x0676('0x18')]===undefined?!![]:![]:!![]})[_0x0676('0xb')](function(_0x43e932){logger[_0x0676('0x12')](_0x0676('0x19'),_0x3e7169);logger['debug']('CreateWhatsappQueueReport',_0x3e7169,JSON[_0x0676('0x1a')](_0x43e932));_0x406589(_0x43e932);})['catch'](function(_0xb9a6f6){logger[_0x0676('0xf')](_0x0676('0x19'),_0xb9a6f6[_0x0676('0x11')],_0x3e7169);_0x18ab0b(_0x1a1c89[_0x0676('0xf')](0x1f4,_0xb9a6f6[_0x0676('0x11')]));});});};exports[_0x0676('0x1b')]=function(_0x35a4af){var _0x3bc7b0=this;return new Promise(function(_0x4c6a97,_0x29461a){return db[_0x0676('0x1c')][_0x0676('0x1d')](_0x35a4af[_0x0676('0x16')],{'raw':_0x35a4af[_0x0676('0x17')]?_0x35a4af['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x35a4af[_0x0676('0x17')]?_0x35a4af[_0x0676('0x17')]['where']||null:null,'attributes':_0x35a4af[_0x0676('0x17')]?_0x35a4af[_0x0676('0x17')][_0x0676('0x1e')]||null:null,'limit':_0x35a4af[_0x0676('0x17')]?_0x35a4af[_0x0676('0x17')][_0x0676('0x1f')]||null:null})[_0x0676('0xb')](function(_0x462743){logger['info'](_0x0676('0x1b'),_0x35a4af);logger['debug']('UpdateWhatsappQueueReport',_0x35a4af,JSON[_0x0676('0x1a')](_0x462743));_0x4c6a97(_0x462743);})[_0x0676('0x20')](function(_0x4805c7){logger[_0x0676('0xf')](_0x0676('0x1b'),_0x4805c7[_0x0676('0x11')],_0x35a4af);_0x29461a(_0x3bc7b0[_0x0676('0xf')](0x1f4,_0x4805c7[_0x0676('0x11')]));});});};
\ No newline at end of file
+var _0x427d=['UpdateWhatsappQueueReport','update','where','attributes','limit','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','then','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','body','options','raw'];(function(_0x90981b,_0xd6631e){var _0x56961a=function(_0x1d6d11){while(--_0x1d6d11){_0x90981b['push'](_0x90981b['shift']());}};_0x56961a(++_0xd6631e);}(_0x427d,0xa0));var _0xd427=function(_0x3ca786,_0x1276cf){_0x3ca786=_0x3ca786-0x0;var _0xed2ca5=_0x427d[_0x3ca786];return _0xed2ca5;};'use strict';var _=require('lodash');var util=require(_0xd427('0x0'));var moment=require('moment');var BPromise=require(_0xd427('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd427('0x2'));var db=require(_0xd427('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xd427('0x4'))(_0xd427('0x5'));var config=require(_0xd427('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xd427('0x7')][_0xd427('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5ef76d,_0x31282f,_0x63f6e2){return new BPromise(function(_0x30a866,_0x49a1db){return client['request'](_0x5ef76d,_0x63f6e2)[_0xd427('0x9')](function(_0x5306bb){logger['info'](_0xd427('0xa'),_0x31282f,_0xd427('0xb'));logger[_0xd427('0xc')](_0xd427('0xd'),_0x31282f,'request\x20sent',JSON[_0xd427('0xe')](_0x5306bb));if(_0x5306bb[_0xd427('0xf')]){if(_0x5306bb[_0xd427('0xf')][_0xd427('0x10')]===0x1f4){logger['error'](_0xd427('0xa'),_0x31282f,_0x5306bb[_0xd427('0xf')][_0xd427('0x11')]);return _0x49a1db(_0x5306bb[_0xd427('0xf')][_0xd427('0x11')]);}logger[_0xd427('0xf')](_0xd427('0xa'),_0x31282f,_0x5306bb[_0xd427('0xf')]['message']);return _0x30a866(_0x5306bb[_0xd427('0xf')][_0xd427('0x11')]);}else{logger[_0xd427('0x12')](_0xd427('0xa'),_0x31282f,_0xd427('0xb'));_0x30a866(_0x5306bb[_0xd427('0x13')][_0xd427('0x11')]);}})[_0xd427('0x14')](function(_0x195d82){logger['error'](_0xd427('0xa'),_0x31282f,_0x195d82);_0x49a1db(_0x195d82);});});}exports[_0xd427('0x15')]=function(_0x165a67){var _0x305eb5=this;return new Promise(function(_0x3c90cc,_0x4303d4){return db[_0xd427('0x16')]['create'](_0x165a67[_0xd427('0x17')],{'raw':_0x165a67[_0xd427('0x18')]?_0x165a67[_0xd427('0x18')][_0xd427('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x2074c7){logger[_0xd427('0x12')](_0xd427('0x15'),_0x165a67);logger[_0xd427('0xc')](_0xd427('0x15'),_0x165a67,JSON[_0xd427('0xe')](_0x2074c7));_0x3c90cc(_0x2074c7);})[_0xd427('0x14')](function(_0x46f7cc){logger[_0xd427('0xf')](_0xd427('0x15'),_0x46f7cc[_0xd427('0x11')],_0x165a67);_0x4303d4(_0x305eb5[_0xd427('0xf')](0x1f4,_0x46f7cc[_0xd427('0x11')]));});});};exports[_0xd427('0x1a')]=function(_0x20dc69){var _0x306190=this;return new Promise(function(_0x3600b0,_0x7430e0){return db[_0xd427('0x16')][_0xd427('0x1b')](_0x20dc69[_0xd427('0x17')],{'raw':_0x20dc69['options']?_0x20dc69['options'][_0xd427('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x20dc69[_0xd427('0x18')]?_0x20dc69[_0xd427('0x18')][_0xd427('0x1c')]||null:null,'attributes':_0x20dc69['options']?_0x20dc69['options'][_0xd427('0x1d')]||null:null,'limit':_0x20dc69[_0xd427('0x18')]?_0x20dc69['options'][_0xd427('0x1e')]||null:null})['then'](function(_0x15b75f){logger[_0xd427('0x12')](_0xd427('0x1a'),_0x20dc69);logger[_0xd427('0xc')](_0xd427('0x1a'),_0x20dc69,JSON['stringify'](_0x15b75f));_0x3600b0(_0x15b75f);})[_0xd427('0x14')](function(_0x9c351d){logger[_0xd427('0xf')]('UpdateWhatsappQueueReport',_0x9c351d['message'],_0x20dc69);_0x7430e0(_0x306190[_0xd427('0xf')](0x1f4,_0x9c351d['message']));});});};
\ No newline at end of file