Built motion from commit (unavailable).|2.2.4
[motion2.git] / server / api / faxQueueReport / faxQueueReport.rpc.js
index a01b937..3d00634 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9348=['bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','FaxQueueReport,\x20%s,\x20%s','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','FaxQueueReport','create','body','options','then','CreateFaxQueueReport','catch','UpdateFaxQueueReport','update','raw','where','limit','lodash','util','moment'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x9348,0x10d));var _0x8934=function(_0x443cef,_0x2cd289){_0x443cef=_0x443cef-0x0;var _0x147c47=_0x9348[_0x443cef];return _0x147c47;};'use strict';var _=require(_0x8934('0x0'));var util=require(_0x8934('0x1'));var moment=require(_0x8934('0x2'));var BPromise=require(_0x8934('0x3'));var rs=require(_0x8934('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8934('0x5'))['db'];var utils=require(_0x8934('0x6'));var logger=require('../../config/logger')(_0x8934('0x7'));var config=require(_0x8934('0x8'));var jayson=require(_0x8934('0x9'));var client=jayson[_0x8934('0xa')][_0x8934('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3ee9b9,_0x512f30,_0x284a62){return new BPromise(function(_0x3734c5,_0x1c7f03){return client['request'](_0x3ee9b9,_0x284a62)['then'](function(_0x5ec16d){logger['info'](_0x8934('0xc'),_0x512f30,'request\x20sent');logger[_0x8934('0xd')](_0x8934('0xe'),_0x512f30,_0x8934('0xf'),JSON[_0x8934('0x10')](_0x5ec16d));if(_0x5ec16d[_0x8934('0x11')]){if(_0x5ec16d[_0x8934('0x11')][_0x8934('0x12')]===0x1f4){logger[_0x8934('0x11')]('FaxQueueReport,\x20%s,\x20%s',_0x512f30,_0x5ec16d[_0x8934('0x11')][_0x8934('0x13')]);return _0x1c7f03(_0x5ec16d[_0x8934('0x11')][_0x8934('0x13')]);}logger[_0x8934('0x11')](_0x8934('0xc'),_0x512f30,_0x5ec16d['error'][_0x8934('0x13')]);return _0x3734c5(_0x5ec16d[_0x8934('0x11')][_0x8934('0x13')]);}else{logger[_0x8934('0x14')](_0x8934('0xc'),_0x512f30,_0x8934('0xf'));_0x3734c5(_0x5ec16d[_0x8934('0x15')][_0x8934('0x13')]);}})['catch'](function(_0xb86bc9){logger[_0x8934('0x11')](_0x8934('0xc'),_0x512f30,_0xb86bc9);_0x1c7f03(_0xb86bc9);});});}exports['CreateFaxQueueReport']=function(_0x47f25e){var _0x597eed=this;return new Promise(function(_0x2ff9ce,_0x51f9ed){return db[_0x8934('0x16')][_0x8934('0x17')](_0x47f25e[_0x8934('0x18')],{'raw':_0x47f25e[_0x8934('0x19')]?_0x47f25e[_0x8934('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x8934('0x1a')](function(_0x5ae49f){logger[_0x8934('0x14')](_0x8934('0x1b'),_0x47f25e);logger[_0x8934('0xd')](_0x8934('0x1b'),_0x47f25e,JSON[_0x8934('0x10')](_0x5ae49f));_0x2ff9ce(_0x5ae49f);})[_0x8934('0x1c')](function(_0x36fe20){logger['error'](_0x8934('0x1b'),_0x36fe20[_0x8934('0x13')],_0x47f25e);_0x51f9ed(_0x597eed[_0x8934('0x11')](0x1f4,_0x36fe20[_0x8934('0x13')]));});});};exports[_0x8934('0x1d')]=function(_0x5e593b){var _0x3cf295=this;return new Promise(function(_0x1c15c5,_0x1b5775){return db['FaxQueueReport'][_0x8934('0x1e')](_0x5e593b['body'],{'raw':_0x5e593b[_0x8934('0x19')]?_0x5e593b[_0x8934('0x19')][_0x8934('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5e593b['options']?_0x5e593b[_0x8934('0x19')][_0x8934('0x20')]||null:null,'attributes':_0x5e593b[_0x8934('0x19')]?_0x5e593b[_0x8934('0x19')]['attributes']||null:null,'limit':_0x5e593b[_0x8934('0x19')]?_0x5e593b[_0x8934('0x19')][_0x8934('0x21')]||null:null})[_0x8934('0x1a')](function(_0x44972b){logger[_0x8934('0x14')](_0x8934('0x1d'),_0x5e593b);logger[_0x8934('0xd')](_0x8934('0x1d'),_0x5e593b,JSON[_0x8934('0x10')](_0x44972b));_0x1c15c5(_0x44972b);})['catch'](function(_0x1d068c){logger[_0x8934('0x11')]('UpdateFaxQueueReport',_0x1d068c[_0x8934('0x13')],_0x5e593b);_0x1b5775(_0x3cf295[_0x8934('0x11')](0x1f4,_0x1d068c[_0x8934('0x13')]));});});};
\ No newline at end of file
+var _0x2f68=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','FaxQueueReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','CreateFaxQueueReport','FaxQueueReport','body','options','raw','UpdateFaxQueueReport','where','attributes','limit','util'];(function(_0x3151ba,_0x5325ef){var _0x4206cd=function(_0x4ec733){while(--_0x4ec733){_0x3151ba['push'](_0x3151ba['shift']());}};_0x4206cd(++_0x5325ef);}(_0x2f68,0x12b));var _0x82f6=function(_0x3685aa,_0xe9bfd0){_0x3685aa=_0x3685aa-0x0;var _0x5dfb2b=_0x2f68[_0x3685aa];return _0x5dfb2b;};'use strict';var _=require('lodash');var util=require(_0x82f6('0x0'));var moment=require(_0x82f6('0x1'));var BPromise=require(_0x82f6('0x2'));var rs=require(_0x82f6('0x3'));var fs=require('fs');var Redis=require(_0x82f6('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x82f6('0x5'));var logger=require(_0x82f6('0x6'))(_0x82f6('0x7'));var config=require(_0x82f6('0x8'));var jayson=require(_0x82f6('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x9ad1f,_0x4fa10f,_0x282bc8){return new BPromise(function(_0x3fd6ef,_0x159ea8){return client['request'](_0x9ad1f,_0x282bc8)[_0x82f6('0xa')](function(_0x415226){logger[_0x82f6('0xb')](_0x82f6('0xc'),_0x4fa10f,'request\x20sent');logger[_0x82f6('0xd')]('FaxQueueReport,\x20%s,\x20%s,\x20%s',_0x4fa10f,'request\x20sent',JSON[_0x82f6('0xe')](_0x415226));if(_0x415226['error']){if(_0x415226[_0x82f6('0xf')][_0x82f6('0x10')]===0x1f4){logger['error'](_0x82f6('0xc'),_0x4fa10f,_0x415226['error'][_0x82f6('0x11')]);return _0x159ea8(_0x415226['error']['message']);}logger[_0x82f6('0xf')](_0x82f6('0xc'),_0x4fa10f,_0x415226[_0x82f6('0xf')][_0x82f6('0x11')]);return _0x3fd6ef(_0x415226[_0x82f6('0xf')][_0x82f6('0x11')]);}else{logger[_0x82f6('0xb')](_0x82f6('0xc'),_0x4fa10f,_0x82f6('0x12'));_0x3fd6ef(_0x415226[_0x82f6('0x13')][_0x82f6('0x11')]);}})[_0x82f6('0x14')](function(_0x412d1f){logger[_0x82f6('0xf')](_0x82f6('0xc'),_0x4fa10f,_0x412d1f);_0x159ea8(_0x412d1f);});});}exports[_0x82f6('0x15')]=function(_0x59333a){var _0x2a16e2=this;return new Promise(function(_0x39dea8,_0x32b458){return db[_0x82f6('0x16')]['create'](_0x59333a[_0x82f6('0x17')],{'raw':_0x59333a[_0x82f6('0x18')]?_0x59333a[_0x82f6('0x18')][_0x82f6('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x3abb44){logger[_0x82f6('0xb')]('CreateFaxQueueReport',_0x59333a);logger[_0x82f6('0xd')](_0x82f6('0x15'),_0x59333a,JSON[_0x82f6('0xe')](_0x3abb44));_0x39dea8(_0x3abb44);})['catch'](function(_0x2099dc){logger['error'](_0x82f6('0x15'),_0x2099dc['message'],_0x59333a);_0x32b458(_0x2a16e2[_0x82f6('0xf')](0x1f4,_0x2099dc[_0x82f6('0x11')]));});});};exports[_0x82f6('0x1a')]=function(_0x219101){var _0x390681=this;return new Promise(function(_0x4b9384,_0x6aa93d){return db[_0x82f6('0x16')]['update'](_0x219101[_0x82f6('0x17')],{'raw':_0x219101['options']?_0x219101[_0x82f6('0x18')][_0x82f6('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x219101[_0x82f6('0x18')]?_0x219101['options'][_0x82f6('0x1b')]||null:null,'attributes':_0x219101[_0x82f6('0x18')]?_0x219101['options'][_0x82f6('0x1c')]||null:null,'limit':_0x219101[_0x82f6('0x18')]?_0x219101[_0x82f6('0x18')][_0x82f6('0x1d')]||null:null})[_0x82f6('0xa')](function(_0x4fde1b){logger[_0x82f6('0xb')](_0x82f6('0x1a'),_0x219101);logger[_0x82f6('0xd')](_0x82f6('0x1a'),_0x219101,JSON[_0x82f6('0xe')](_0x4fde1b));_0x4b9384(_0x4fde1b);})['catch'](function(_0x18b21a){logger['error'](_0x82f6('0x1a'),_0x18b21a['message'],_0x219101);_0x6aa93d(_0x390681[_0x82f6('0xf')](0x1f4,_0x18b21a['message']));});});};
\ No newline at end of file