Built motion from commit c0cdc9d8.|2.6.28
[motion2.git] / server / api / whatsappQueueReport / whatsappQueueReport.rpc.js
index 6f26ff4..005f295 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x200a=['lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','options','raw','UpdateWhatsappQueueReport','body','where','attributes'];(function(_0x4266d5,_0x4b9d46){var _0x23ac3f=function(_0x34be93){while(--_0x34be93){_0x4266d5['push'](_0x4266d5['shift']());}};_0x23ac3f(++_0x4b9d46);}(_0x200a,0xf8));var _0xa200=function(_0x1529a3,_0x529f63){_0x1529a3=_0x1529a3-0x0;var _0x1a0d4b=_0x200a[_0x1529a3];return _0x1a0d4b;};'use strict';var _=require(_0xa200('0x0'));var util=require(_0xa200('0x1'));var moment=require('moment');var BPromise=require(_0xa200('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa200('0x3'));var db=require(_0xa200('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa200('0x5'))(_0xa200('0x6'));var config=require(_0xa200('0x7'));var jayson=require(_0xa200('0x8'));var client=jayson['client'][_0xa200('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x26d020,_0x2912b8,_0xf7685e){return new BPromise(function(_0x5df8c8,_0x204803){return client[_0xa200('0xa')](_0x26d020,_0xf7685e)[_0xa200('0xb')](function(_0x3a0c93){logger['info'](_0xa200('0xc'),_0x2912b8,_0xa200('0xd'));logger[_0xa200('0xe')](_0xa200('0xf'),_0x2912b8,'request\x20sent',JSON[_0xa200('0x10')](_0x3a0c93));if(_0x3a0c93['error']){if(_0x3a0c93['error'][_0xa200('0x11')]===0x1f4){logger[_0xa200('0x12')](_0xa200('0xc'),_0x2912b8,_0x3a0c93[_0xa200('0x12')][_0xa200('0x13')]);return _0x204803(_0x3a0c93[_0xa200('0x12')][_0xa200('0x13')]);}logger['error'](_0xa200('0xc'),_0x2912b8,_0x3a0c93['error'][_0xa200('0x13')]);return _0x5df8c8(_0x3a0c93[_0xa200('0x12')]['message']);}else{logger[_0xa200('0x14')]('WhatsappQueueReport,\x20%s,\x20%s',_0x2912b8,'request\x20sent');_0x5df8c8(_0x3a0c93['result'][_0xa200('0x13')]);}})[_0xa200('0x15')](function(_0x54dc79){logger[_0xa200('0x12')](_0xa200('0xc'),_0x2912b8,_0x54dc79);_0x204803(_0x54dc79);});});}exports[_0xa200('0x16')]=function(_0x37d326){var _0x5b9830=this;return new Promise(function(_0x553c89,_0x5cd6f9){return db[_0xa200('0x17')][_0xa200('0x18')](_0x37d326['body'],{'raw':_0x37d326[_0xa200('0x19')]?_0x37d326[_0xa200('0x19')][_0xa200('0x1a')]===undefined?!![]:![]:!![]})[_0xa200('0xb')](function(_0x130944){logger[_0xa200('0x14')](_0xa200('0x16'),_0x37d326);logger['debug'](_0xa200('0x16'),_0x37d326,JSON[_0xa200('0x10')](_0x130944));_0x553c89(_0x130944);})[_0xa200('0x15')](function(_0x103f1f){logger[_0xa200('0x12')]('CreateWhatsappQueueReport',_0x103f1f[_0xa200('0x13')],_0x37d326);_0x5cd6f9(_0x5b9830[_0xa200('0x12')](0x1f4,_0x103f1f[_0xa200('0x13')]));});});};exports[_0xa200('0x1b')]=function(_0x137b83){var _0x3d0239=this;return new Promise(function(_0xd182be,_0x331105){return db[_0xa200('0x17')]['update'](_0x137b83[_0xa200('0x1c')],{'raw':_0x137b83[_0xa200('0x19')]?_0x137b83[_0xa200('0x19')][_0xa200('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x137b83[_0xa200('0x19')]?_0x137b83[_0xa200('0x19')][_0xa200('0x1d')]||null:null,'attributes':_0x137b83[_0xa200('0x19')]?_0x137b83['options'][_0xa200('0x1e')]||null:null,'limit':_0x137b83[_0xa200('0x19')]?_0x137b83[_0xa200('0x19')]['limit']||null:null})[_0xa200('0xb')](function(_0x1ffd3f){logger[_0xa200('0x14')](_0xa200('0x1b'),_0x137b83);logger[_0xa200('0xe')](_0xa200('0x1b'),_0x137b83,JSON[_0xa200('0x10')](_0x1ffd3f));_0xd182be(_0x1ffd3f);})[_0xa200('0x15')](function(_0x39a36f){logger[_0xa200('0x12')](_0xa200('0x1b'),_0x39a36f['message'],_0x137b83);_0x331105(_0x3d0239['error'](0x1f4,_0x39a36f[_0xa200('0x13')]));});});};
\ No newline at end of file
+var _0xbf47=['stringify','UpdateWhatsappQueueReport','WhatsappQueueReport','update','raw','where','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','request','then','info','request\x20sent','error','message','catch','WhatsappQueueReport,\x20%s,\x20%s','CreateWhatsappQueueReport','create','body','options','debug'];(function(_0x4cc8e2,_0x1aa3d6){var _0x140ea5=function(_0x2d60a5){while(--_0x2d60a5){_0x4cc8e2['push'](_0x4cc8e2['shift']());}};_0x140ea5(++_0x1aa3d6);}(_0xbf47,0x16f));var _0x7bf4=function(_0x2de2ed,_0x28cd92){_0x2de2ed=_0x2de2ed-0x0;var _0x5edd69=_0xbf47[_0x2de2ed];return _0x5edd69;};'use strict';var _=require(_0x7bf4('0x0'));var util=require('util');var moment=require(_0x7bf4('0x1'));var BPromise=require(_0x7bf4('0x2'));var rs=require(_0x7bf4('0x3'));var fs=require('fs');var Redis=require(_0x7bf4('0x4'));var db=require(_0x7bf4('0x5'))['db'];var utils=require(_0x7bf4('0x6'));var logger=require(_0x7bf4('0x7'))(_0x7bf4('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x7bf4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x27b1cf,_0x29c997,_0x41a366){return new BPromise(function(_0xf6c894,_0x16cee0){return client[_0x7bf4('0xa')](_0x27b1cf,_0x41a366)[_0x7bf4('0xb')](function(_0x13dda9){logger[_0x7bf4('0xc')]('WhatsappQueueReport,\x20%s,\x20%s',_0x29c997,_0x7bf4('0xd'));logger['debug']('WhatsappQueueReport,\x20%s,\x20%s,\x20%s',_0x29c997,_0x7bf4('0xd'),JSON['stringify'](_0x13dda9));if(_0x13dda9[_0x7bf4('0xe')]){if(_0x13dda9['error']['code']===0x1f4){logger[_0x7bf4('0xe')]('WhatsappQueueReport,\x20%s,\x20%s',_0x29c997,_0x13dda9['error']['message']);return _0x16cee0(_0x13dda9[_0x7bf4('0xe')][_0x7bf4('0xf')]);}logger['error']('WhatsappQueueReport,\x20%s,\x20%s',_0x29c997,_0x13dda9[_0x7bf4('0xe')]['message']);return _0xf6c894(_0x13dda9[_0x7bf4('0xe')][_0x7bf4('0xf')]);}else{logger[_0x7bf4('0xc')]('WhatsappQueueReport,\x20%s,\x20%s',_0x29c997,'request\x20sent');_0xf6c894(_0x13dda9['result'][_0x7bf4('0xf')]);}})[_0x7bf4('0x10')](function(_0x39fb0c){logger[_0x7bf4('0xe')](_0x7bf4('0x11'),_0x29c997,_0x39fb0c);_0x16cee0(_0x39fb0c);});});}exports[_0x7bf4('0x12')]=function(_0x19b9e0){var _0x5a0f8a=this;return new Promise(function(_0x3c5b2b,_0x3b0963){return db['WhatsappQueueReport'][_0x7bf4('0x13')](_0x19b9e0[_0x7bf4('0x14')],{'raw':_0x19b9e0[_0x7bf4('0x15')]?_0x19b9e0['options']['raw']===undefined?!![]:![]:!![]})[_0x7bf4('0xb')](function(_0x4c34c3){logger[_0x7bf4('0xc')](_0x7bf4('0x12'),_0x19b9e0);logger[_0x7bf4('0x16')](_0x7bf4('0x12'),_0x19b9e0,JSON[_0x7bf4('0x17')](_0x4c34c3));_0x3c5b2b(_0x4c34c3);})[_0x7bf4('0x10')](function(_0x53a82d){logger[_0x7bf4('0xe')]('CreateWhatsappQueueReport',_0x53a82d[_0x7bf4('0xf')],_0x19b9e0);_0x3b0963(_0x5a0f8a[_0x7bf4('0xe')](0x1f4,_0x53a82d['message']));});});};exports[_0x7bf4('0x18')]=function(_0x277f58){var _0x11f5b3=this;return new Promise(function(_0x27b9b7,_0x5da71c){return db[_0x7bf4('0x19')][_0x7bf4('0x1a')](_0x277f58[_0x7bf4('0x14')],{'raw':_0x277f58[_0x7bf4('0x15')]?_0x277f58['options'][_0x7bf4('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x277f58['options']?_0x277f58[_0x7bf4('0x15')][_0x7bf4('0x1c')]||null:null,'attributes':_0x277f58[_0x7bf4('0x15')]?_0x277f58[_0x7bf4('0x15')]['attributes']||null:null,'limit':_0x277f58[_0x7bf4('0x15')]?_0x277f58['options'][_0x7bf4('0x1d')]||null:null})[_0x7bf4('0xb')](function(_0x46de7a){logger['info'](_0x7bf4('0x18'),_0x277f58);logger['debug']('UpdateWhatsappQueueReport',_0x277f58,JSON[_0x7bf4('0x17')](_0x46de7a));_0x27b9b7(_0x46de7a);})[_0x7bf4('0x10')](function(_0x1f0cd3){logger[_0x7bf4('0xe')](_0x7bf4('0x18'),_0x1f0cd3[_0x7bf4('0xf')],_0x277f58);_0x5da71c(_0x11f5b3[_0x7bf4('0xe')](0x1f4,_0x1f0cd3[_0x7bf4('0xf')]));});});};
\ No newline at end of file