Built motion from commit e02f907f.|2.6.14
[motion2.git] / server / api / faxQueueReport / faxQueueReport.rpc.js
index 09ba8e2..fc46163 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7d4=['options','raw','CreateFaxQueueReport','debug','UpdateFaxQueueReport','update','attributes','limit','then','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','jayson/promise','client','http','request','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','FaxQueueReport','create','body'];(function(_0x290181,_0x46db3e){var _0x2dc9dc=function(_0x1f08d6){while(--_0x1f08d6){_0x290181['push'](_0x290181['shift']());}};_0x2dc9dc(++_0x46db3e);}(_0xb7d4,0x19c));var _0x4b7d=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xb7d4[_0x413feb];return _0x40ee88;};'use strict';var _=require('lodash');var util=require(_0x4b7d('0x0'));var moment=require(_0x4b7d('0x1'));var BPromise=require(_0x4b7d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4b7d('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x4b7d('0x4'));var logger=require(_0x4b7d('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x4b7d('0x6'));var client=jayson[_0x4b7d('0x7')][_0x4b7d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x473fe0,_0x318c73,_0x1edc7e){return new BPromise(function(_0x4605bc,_0x56f94c){return client[_0x4b7d('0x9')](_0x473fe0,_0x1edc7e)['then'](function(_0x58e3ab){logger[_0x4b7d('0xa')](_0x4b7d('0xb'),_0x318c73,_0x4b7d('0xc'));logger['debug']('FaxQueueReport,\x20%s,\x20%s,\x20%s',_0x318c73,_0x4b7d('0xc'),JSON[_0x4b7d('0xd')](_0x58e3ab));if(_0x58e3ab[_0x4b7d('0xe')]){if(_0x58e3ab[_0x4b7d('0xe')][_0x4b7d('0xf')]===0x1f4){logger['error']('FaxQueueReport,\x20%s,\x20%s',_0x318c73,_0x58e3ab[_0x4b7d('0xe')][_0x4b7d('0x10')]);return _0x56f94c(_0x58e3ab['error'][_0x4b7d('0x10')]);}logger[_0x4b7d('0xe')](_0x4b7d('0xb'),_0x318c73,_0x58e3ab[_0x4b7d('0xe')][_0x4b7d('0x10')]);return _0x4605bc(_0x58e3ab[_0x4b7d('0xe')][_0x4b7d('0x10')]);}else{logger[_0x4b7d('0xa')](_0x4b7d('0xb'),_0x318c73,_0x4b7d('0xc'));_0x4605bc(_0x58e3ab[_0x4b7d('0x11')][_0x4b7d('0x10')]);}})[_0x4b7d('0x12')](function(_0x54b043){logger['error'](_0x4b7d('0xb'),_0x318c73,_0x54b043);_0x56f94c(_0x54b043);});});}exports['CreateFaxQueueReport']=function(_0x2426b8){var _0x13f819=this;return new Promise(function(_0x1566b6,_0x119524){return db[_0x4b7d('0x13')][_0x4b7d('0x14')](_0x2426b8[_0x4b7d('0x15')],{'raw':_0x2426b8[_0x4b7d('0x16')]?_0x2426b8['options'][_0x4b7d('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x1d00f7){logger[_0x4b7d('0xa')](_0x4b7d('0x18'),_0x2426b8);logger[_0x4b7d('0x19')](_0x4b7d('0x18'),_0x2426b8,JSON[_0x4b7d('0xd')](_0x1d00f7));_0x1566b6(_0x1d00f7);})['catch'](function(_0x445a35){logger[_0x4b7d('0xe')](_0x4b7d('0x18'),_0x445a35[_0x4b7d('0x10')],_0x2426b8);_0x119524(_0x13f819[_0x4b7d('0xe')](0x1f4,_0x445a35[_0x4b7d('0x10')]));});});};exports[_0x4b7d('0x1a')]=function(_0x6ed215){var _0x519117=this;return new Promise(function(_0x298121,_0x47f423){return db['FaxQueueReport'][_0x4b7d('0x1b')](_0x6ed215[_0x4b7d('0x15')],{'raw':_0x6ed215[_0x4b7d('0x16')]?_0x6ed215[_0x4b7d('0x16')][_0x4b7d('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x6ed215[_0x4b7d('0x16')]?_0x6ed215[_0x4b7d('0x16')]['where']||null:null,'attributes':_0x6ed215[_0x4b7d('0x16')]?_0x6ed215[_0x4b7d('0x16')][_0x4b7d('0x1c')]||null:null,'limit':_0x6ed215[_0x4b7d('0x16')]?_0x6ed215[_0x4b7d('0x16')][_0x4b7d('0x1d')]||null:null})[_0x4b7d('0x1e')](function(_0x541030){logger[_0x4b7d('0xa')](_0x4b7d('0x1a'),_0x6ed215);logger['debug'](_0x4b7d('0x1a'),_0x6ed215,JSON['stringify'](_0x541030));_0x298121(_0x541030);})['catch'](function(_0x300be3){logger[_0x4b7d('0xe')]('UpdateFaxQueueReport',_0x300be3[_0x4b7d('0x10')],_0x6ed215);_0x47f423(_0x519117['error'](0x1f4,_0x300be3[_0x4b7d('0x10')]));});});};
\ No newline at end of file
+var _0x1ba2=['options','catch','UpdateFaxQueueReport','update','raw','where','limit','lodash','moment','bluebird','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FaxQueueReport,\x20%s,\x20%s','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','CreateFaxQueueReport','FaxQueueReport','create','body'];(function(_0x3b98c0,_0x1a54b1){var _0x513eea=function(_0x37d8f5){while(--_0x37d8f5){_0x3b98c0['push'](_0x3b98c0['shift']());}};_0x513eea(++_0x1a54b1);}(_0x1ba2,0xe0));var _0x21ba=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1ba2[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x21ba('0x0'));var util=require('util');var moment=require(_0x21ba('0x1'));var BPromise=require(_0x21ba('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x21ba('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x21ba('0x4'));var config=require(_0x21ba('0x5'));var jayson=require(_0x21ba('0x6'));var client=jayson[_0x21ba('0x7')][_0x21ba('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1fb85f,_0x23a3ac,_0x1d0a9a){return new BPromise(function(_0x157984,_0x338ebf){return client[_0x21ba('0x9')](_0x1fb85f,_0x1d0a9a)[_0x21ba('0xa')](function(_0x5c17a4){logger[_0x21ba('0xb')](_0x21ba('0xc'),_0x23a3ac,'request\x20sent');logger[_0x21ba('0xd')](_0x21ba('0xe'),_0x23a3ac,'request\x20sent',JSON[_0x21ba('0xf')](_0x5c17a4));if(_0x5c17a4[_0x21ba('0x10')]){if(_0x5c17a4[_0x21ba('0x10')]['code']===0x1f4){logger['error'](_0x21ba('0xc'),_0x23a3ac,_0x5c17a4[_0x21ba('0x10')][_0x21ba('0x11')]);return _0x338ebf(_0x5c17a4[_0x21ba('0x10')][_0x21ba('0x11')]);}logger[_0x21ba('0x10')](_0x21ba('0xc'),_0x23a3ac,_0x5c17a4[_0x21ba('0x10')][_0x21ba('0x11')]);return _0x157984(_0x5c17a4['error'][_0x21ba('0x11')]);}else{logger['info']('FaxQueueReport,\x20%s,\x20%s',_0x23a3ac,_0x21ba('0x12'));_0x157984(_0x5c17a4[_0x21ba('0x13')][_0x21ba('0x11')]);}})['catch'](function(_0x57b945){logger[_0x21ba('0x10')](_0x21ba('0xc'),_0x23a3ac,_0x57b945);_0x338ebf(_0x57b945);});});}exports[_0x21ba('0x14')]=function(_0xe64ad4){var _0x123014=this;return new Promise(function(_0x42d46a,_0x11e680){return db[_0x21ba('0x15')][_0x21ba('0x16')](_0xe64ad4[_0x21ba('0x17')],{'raw':_0xe64ad4[_0x21ba('0x18')]?_0xe64ad4['options']['raw']===undefined?!![]:![]:!![]})[_0x21ba('0xa')](function(_0x1822b5){logger['info'](_0x21ba('0x14'),_0xe64ad4);logger[_0x21ba('0xd')](_0x21ba('0x14'),_0xe64ad4,JSON[_0x21ba('0xf')](_0x1822b5));_0x42d46a(_0x1822b5);})[_0x21ba('0x19')](function(_0x2832aa){logger[_0x21ba('0x10')]('CreateFaxQueueReport',_0x2832aa[_0x21ba('0x11')],_0xe64ad4);_0x11e680(_0x123014[_0x21ba('0x10')](0x1f4,_0x2832aa[_0x21ba('0x11')]));});});};exports[_0x21ba('0x1a')]=function(_0x3c8f0f){var _0x1d81ec=this;return new Promise(function(_0x34474c,_0x523009){return db[_0x21ba('0x15')][_0x21ba('0x1b')](_0x3c8f0f[_0x21ba('0x17')],{'raw':_0x3c8f0f['options']?_0x3c8f0f[_0x21ba('0x18')][_0x21ba('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3c8f0f[_0x21ba('0x18')]?_0x3c8f0f['options'][_0x21ba('0x1d')]||null:null,'attributes':_0x3c8f0f[_0x21ba('0x18')]?_0x3c8f0f['options']['attributes']||null:null,'limit':_0x3c8f0f[_0x21ba('0x18')]?_0x3c8f0f['options'][_0x21ba('0x1e')]||null:null})['then'](function(_0x52ad4a){logger[_0x21ba('0xb')](_0x21ba('0x1a'),_0x3c8f0f);logger[_0x21ba('0xd')](_0x21ba('0x1a'),_0x3c8f0f,JSON[_0x21ba('0xf')](_0x52ad4a));_0x34474c(_0x52ad4a);})[_0x21ba('0x19')](function(_0x3e03c3){logger['error']('UpdateFaxQueueReport',_0x3e03c3[_0x21ba('0x11')],_0x3c8f0f);_0x523009(_0x1d81ec[_0x21ba('0x10')](0x1f4,_0x3e03c3[_0x21ba('0x11')]));});});};
\ No newline at end of file