Built motion from commit fade34fd.|2.5.41
[motion2.git] / server / api / faxQueueReport / faxQueueReport.rpc.js
index 6efb8b2..3f85b12 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8fdf=['info','FaxQueueReport,\x20%s,\x20%s','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','CreateFaxQueueReport','FaxQueueReport','create','options','raw','stringify','catch','UpdateFaxQueueReport','update','body','where','limit','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x52e040,_0x583d2f){var _0x4cd278=function(_0xa844b5){while(--_0xa844b5){_0x52e040['push'](_0x52e040['shift']());}};_0x4cd278(++_0x583d2f);}(_0x8fdf,0x196));var _0xf8fd=function(_0x46c5bc,_0x1daaa0){_0x46c5bc=_0x46c5bc-0x0;var _0x5ba90f=_0x8fdf[_0x46c5bc];return _0x5ba90f;};'use strict';var _=require(_0xf8fd('0x0'));var util=require(_0xf8fd('0x1'));var moment=require('moment');var BPromise=require(_0xf8fd('0x2'));var rs=require(_0xf8fd('0x3'));var fs=require('fs');var Redis=require(_0xf8fd('0x4'));var db=require(_0xf8fd('0x5'))['db'];var utils=require(_0xf8fd('0x6'));var logger=require(_0xf8fd('0x7'))(_0xf8fd('0x8'));var config=require(_0xf8fd('0x9'));var jayson=require(_0xf8fd('0xa'));var client=jayson[_0xf8fd('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x30e790,_0xb3ec14,_0x4b2ba0){return new BPromise(function(_0xf3d6b3,_0x2134de){return client[_0xf8fd('0xc')](_0x30e790,_0x4b2ba0)[_0xf8fd('0xd')](function(_0x3fa312){logger[_0xf8fd('0xe')](_0xf8fd('0xf'),_0xb3ec14,'request\x20sent');logger[_0xf8fd('0x10')](_0xf8fd('0x11'),_0xb3ec14,_0xf8fd('0x12'),JSON['stringify'](_0x3fa312));if(_0x3fa312[_0xf8fd('0x13')]){if(_0x3fa312[_0xf8fd('0x13')][_0xf8fd('0x14')]===0x1f4){logger[_0xf8fd('0x13')](_0xf8fd('0xf'),_0xb3ec14,_0x3fa312[_0xf8fd('0x13')]['message']);return _0x2134de(_0x3fa312[_0xf8fd('0x13')]['message']);}logger[_0xf8fd('0x13')](_0xf8fd('0xf'),_0xb3ec14,_0x3fa312[_0xf8fd('0x13')][_0xf8fd('0x15')]);return _0xf3d6b3(_0x3fa312[_0xf8fd('0x13')][_0xf8fd('0x15')]);}else{logger['info'](_0xf8fd('0xf'),_0xb3ec14,_0xf8fd('0x12'));_0xf3d6b3(_0x3fa312[_0xf8fd('0x16')][_0xf8fd('0x15')]);}})['catch'](function(_0x5986d3){logger[_0xf8fd('0x13')](_0xf8fd('0xf'),_0xb3ec14,_0x5986d3);_0x2134de(_0x5986d3);});});}exports[_0xf8fd('0x17')]=function(_0x287ea3){var _0x193ff8=this;return new Promise(function(_0x24024b,_0x4cd992){return db[_0xf8fd('0x18')][_0xf8fd('0x19')](_0x287ea3['body'],{'raw':_0x287ea3[_0xf8fd('0x1a')]?_0x287ea3['options'][_0xf8fd('0x1b')]===undefined?!![]:![]:!![]})[_0xf8fd('0xd')](function(_0x59d38d){logger['info'](_0xf8fd('0x17'),_0x287ea3);logger[_0xf8fd('0x10')](_0xf8fd('0x17'),_0x287ea3,JSON[_0xf8fd('0x1c')](_0x59d38d));_0x24024b(_0x59d38d);})[_0xf8fd('0x1d')](function(_0x1330c7){logger[_0xf8fd('0x13')](_0xf8fd('0x17'),_0x1330c7[_0xf8fd('0x15')],_0x287ea3);_0x4cd992(_0x193ff8[_0xf8fd('0x13')](0x1f4,_0x1330c7[_0xf8fd('0x15')]));});});};exports[_0xf8fd('0x1e')]=function(_0x9172a3){var _0x12213b=this;return new Promise(function(_0x5c6153,_0x32488d){return db[_0xf8fd('0x18')][_0xf8fd('0x1f')](_0x9172a3[_0xf8fd('0x20')],{'raw':_0x9172a3[_0xf8fd('0x1a')]?_0x9172a3[_0xf8fd('0x1a')][_0xf8fd('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x9172a3[_0xf8fd('0x1a')]?_0x9172a3['options'][_0xf8fd('0x21')]||null:null,'attributes':_0x9172a3[_0xf8fd('0x1a')]?_0x9172a3[_0xf8fd('0x1a')]['attributes']||null:null,'limit':_0x9172a3[_0xf8fd('0x1a')]?_0x9172a3[_0xf8fd('0x1a')][_0xf8fd('0x22')]||null:null})[_0xf8fd('0xd')](function(_0x15397e){logger[_0xf8fd('0xe')](_0xf8fd('0x1e'),_0x9172a3);logger['debug']('UpdateFaxQueueReport',_0x9172a3,JSON['stringify'](_0x15397e));_0x5c6153(_0x15397e);})[_0xf8fd('0x1d')](function(_0x51d084){logger[_0xf8fd('0x13')](_0xf8fd('0x1e'),_0x51d084[_0xf8fd('0x15')],_0x9172a3);_0x32488d(_0x12213b['error'](0x1f4,_0x51d084[_0xf8fd('0x15')]));});});};
\ No newline at end of file
+var _0xbccb=['../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','FaxQueueReport','create','body','options','raw','then','CreateFaxQueueReport','UpdateFaxQueueReport','update','where','attributes','lodash','randomstring','../../mysqldb'];(function(_0x14f56e,_0x4cbea2){var _0x18fc21=function(_0x1a7c01){while(--_0x1a7c01){_0x14f56e['push'](_0x14f56e['shift']());}};_0x18fc21(++_0x4cbea2);}(_0xbccb,0xc8));var _0xbbcc=function(_0xfec4f2,_0x27b2aa){_0xfec4f2=_0xfec4f2-0x0;var _0x4ee052=_0xbccb[_0xfec4f2];return _0x4ee052;};'use strict';var _=require(_0xbbcc('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbbcc('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbbcc('0x2'))['db'];var utils=require(_0xbbcc('0x3'));var logger=require(_0xbbcc('0x4'))('rpc');var config=require(_0xbbcc('0x5'));var jayson=require(_0xbbcc('0x6'));var client=jayson['client'][_0xbbcc('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1440e4,_0x397da0,_0x17f6df){return new BPromise(function(_0x251cc3,_0x5e4def){return client[_0xbbcc('0x8')](_0x1440e4,_0x17f6df)['then'](function(_0x1a3873){logger[_0xbbcc('0x9')](_0xbbcc('0xa'),_0x397da0,_0xbbcc('0xb'));logger[_0xbbcc('0xc')](_0xbbcc('0xd'),_0x397da0,_0xbbcc('0xb'),JSON[_0xbbcc('0xe')](_0x1a3873));if(_0x1a3873['error']){if(_0x1a3873[_0xbbcc('0xf')]['code']===0x1f4){logger[_0xbbcc('0xf')](_0xbbcc('0xa'),_0x397da0,_0x1a3873[_0xbbcc('0xf')][_0xbbcc('0x10')]);return _0x5e4def(_0x1a3873[_0xbbcc('0xf')]['message']);}logger[_0xbbcc('0xf')](_0xbbcc('0xa'),_0x397da0,_0x1a3873[_0xbbcc('0xf')][_0xbbcc('0x10')]);return _0x251cc3(_0x1a3873[_0xbbcc('0xf')][_0xbbcc('0x10')]);}else{logger[_0xbbcc('0x9')]('FaxQueueReport,\x20%s,\x20%s',_0x397da0,_0xbbcc('0xb'));_0x251cc3(_0x1a3873['result'][_0xbbcc('0x10')]);}})[_0xbbcc('0x11')](function(_0x35b1d6){logger[_0xbbcc('0xf')](_0xbbcc('0xa'),_0x397da0,_0x35b1d6);_0x5e4def(_0x35b1d6);});});}exports['CreateFaxQueueReport']=function(_0x43203f){var _0x2c094d=this;return new Promise(function(_0x4e71d0,_0x8e8eeb){return db[_0xbbcc('0x12')][_0xbbcc('0x13')](_0x43203f[_0xbbcc('0x14')],{'raw':_0x43203f[_0xbbcc('0x15')]?_0x43203f['options'][_0xbbcc('0x16')]===undefined?!![]:![]:!![]})[_0xbbcc('0x17')](function(_0x4a4d07){logger['info'](_0xbbcc('0x18'),_0x43203f);logger[_0xbbcc('0xc')](_0xbbcc('0x18'),_0x43203f,JSON['stringify'](_0x4a4d07));_0x4e71d0(_0x4a4d07);})[_0xbbcc('0x11')](function(_0x20e8bb){logger[_0xbbcc('0xf')](_0xbbcc('0x18'),_0x20e8bb[_0xbbcc('0x10')],_0x43203f);_0x8e8eeb(_0x2c094d[_0xbbcc('0xf')](0x1f4,_0x20e8bb[_0xbbcc('0x10')]));});});};exports[_0xbbcc('0x19')]=function(_0x381bee){var _0x43acd4=this;return new Promise(function(_0xb2f23d,_0x3cc2fe){return db[_0xbbcc('0x12')][_0xbbcc('0x1a')](_0x381bee[_0xbbcc('0x14')],{'raw':_0x381bee[_0xbbcc('0x15')]?_0x381bee[_0xbbcc('0x15')][_0xbbcc('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x381bee[_0xbbcc('0x15')]?_0x381bee['options'][_0xbbcc('0x1b')]||null:null,'attributes':_0x381bee[_0xbbcc('0x15')]?_0x381bee[_0xbbcc('0x15')][_0xbbcc('0x1c')]||null:null,'limit':_0x381bee[_0xbbcc('0x15')]?_0x381bee['options']['limit']||null:null})['then'](function(_0xa6b964){logger[_0xbbcc('0x9')](_0xbbcc('0x19'),_0x381bee);logger[_0xbbcc('0xc')](_0xbbcc('0x19'),_0x381bee,JSON['stringify'](_0xa6b964));_0xb2f23d(_0xa6b964);})['catch'](function(_0x343b3f){logger['error'](_0xbbcc('0x19'),_0x343b3f['message'],_0x381bee);_0x3cc2fe(_0x43acd4[_0xbbcc('0xf')](0x1f4,_0x343b3f[_0xbbcc('0x10')]));});});};
\ No newline at end of file