Built motion from commit 42801a18.|2.6.28
[motion2.git] / server / api / faxQueueReport / faxQueueReport.rpc.js
index ee695d5..805293e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd50f=['moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','CreateFaxQueueReport','FaxQueueReport','create','options','raw','then','catch','UpdateFaxQueueReport','body','limit','lodash','util'];(function(_0x3b82ba,_0x49540a){var _0xe1e00d=function(_0x530830){while(--_0x530830){_0x3b82ba['push'](_0x3b82ba['shift']());}};_0xe1e00d(++_0x49540a);}(_0xd50f,0x8f));var _0xfd50=function(_0x1dce91,_0x3f3093){_0x1dce91=_0x1dce91-0x0;var _0x25da86=_0xd50f[_0x1dce91];return _0x25da86;};'use strict';var _=require(_0xfd50('0x0'));var util=require(_0xfd50('0x1'));var moment=require(_0xfd50('0x2'));var BPromise=require(_0xfd50('0x3'));var rs=require(_0xfd50('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfd50('0x5'))['db'];var utils=require(_0xfd50('0x6'));var logger=require(_0xfd50('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfd50('0x8'));var client=jayson[_0xfd50('0x9')][_0xfd50('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x390e45,_0x2c987e,_0x5a83d1){return new BPromise(function(_0xd4d10e,_0x1686af){return client['request'](_0x390e45,_0x5a83d1)['then'](function(_0x552d05){logger[_0xfd50('0xb')](_0xfd50('0xc'),_0x2c987e,_0xfd50('0xd'));logger[_0xfd50('0xe')]('FaxQueueReport,\x20%s,\x20%s,\x20%s',_0x2c987e,_0xfd50('0xd'),JSON['stringify'](_0x552d05));if(_0x552d05[_0xfd50('0xf')]){if(_0x552d05['error'][_0xfd50('0x10')]===0x1f4){logger[_0xfd50('0xf')](_0xfd50('0xc'),_0x2c987e,_0x552d05[_0xfd50('0xf')][_0xfd50('0x11')]);return _0x1686af(_0x552d05[_0xfd50('0xf')]['message']);}logger[_0xfd50('0xf')](_0xfd50('0xc'),_0x2c987e,_0x552d05['error']['message']);return _0xd4d10e(_0x552d05[_0xfd50('0xf')]['message']);}else{logger[_0xfd50('0xb')]('FaxQueueReport,\x20%s,\x20%s',_0x2c987e,_0xfd50('0xd'));_0xd4d10e(_0x552d05[_0xfd50('0x12')][_0xfd50('0x11')]);}})['catch'](function(_0x411150){logger[_0xfd50('0xf')](_0xfd50('0xc'),_0x2c987e,_0x411150);_0x1686af(_0x411150);});});}exports[_0xfd50('0x13')]=function(_0x5b98c1){var _0x191dd4=this;return new Promise(function(_0x375189,_0xaa535){return db[_0xfd50('0x14')][_0xfd50('0x15')](_0x5b98c1['body'],{'raw':_0x5b98c1[_0xfd50('0x16')]?_0x5b98c1[_0xfd50('0x16')][_0xfd50('0x17')]===undefined?!![]:![]:!![]})[_0xfd50('0x18')](function(_0x12569c){logger[_0xfd50('0xb')](_0xfd50('0x13'),_0x5b98c1);logger['debug'](_0xfd50('0x13'),_0x5b98c1,JSON['stringify'](_0x12569c));_0x375189(_0x12569c);})[_0xfd50('0x19')](function(_0x2adc3b){logger['error'](_0xfd50('0x13'),_0x2adc3b[_0xfd50('0x11')],_0x5b98c1);_0xaa535(_0x191dd4[_0xfd50('0xf')](0x1f4,_0x2adc3b[_0xfd50('0x11')]));});});};exports[_0xfd50('0x1a')]=function(_0x5b70f6){var _0x5e625d=this;return new Promise(function(_0x36de1d,_0x373034){return db[_0xfd50('0x14')]['update'](_0x5b70f6[_0xfd50('0x1b')],{'raw':_0x5b70f6['options']?_0x5b70f6[_0xfd50('0x16')][_0xfd50('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b70f6[_0xfd50('0x16')]?_0x5b70f6[_0xfd50('0x16')]['where']||null:null,'attributes':_0x5b70f6['options']?_0x5b70f6[_0xfd50('0x16')]['attributes']||null:null,'limit':_0x5b70f6[_0xfd50('0x16')]?_0x5b70f6[_0xfd50('0x16')][_0xfd50('0x1c')]||null:null})[_0xfd50('0x18')](function(_0x536a1a){logger['info'](_0xfd50('0x1a'),_0x5b70f6);logger['debug'](_0xfd50('0x1a'),_0x5b70f6,JSON['stringify'](_0x536a1a));_0x36de1d(_0x536a1a);})[_0xfd50('0x19')](function(_0x59bef9){logger[_0xfd50('0xf')]('UpdateFaxQueueReport',_0x59bef9[_0xfd50('0x11')],_0x5b70f6);_0x373034(_0x5e625d['error'](0x1f4,_0x59bef9['message']));});});};
\ No newline at end of file
+var _0xa866=['randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','FaxQueueReport,\x20%s,\x20%s','message','info','catch','FaxQueueReport','create','body','options','raw','CreateFaxQueueReport','UpdateFaxQueueReport','where','attributes','lodash','bluebird'];(function(_0x4fbfd9,_0x3ab91a){var _0x31dc94=function(_0x11e53b){while(--_0x11e53b){_0x4fbfd9['push'](_0x4fbfd9['shift']());}};_0x31dc94(++_0x3ab91a);}(_0xa866,0x1b0));var _0x6a86=function(_0x4ce2d0,_0x24dd7a){_0x4ce2d0=_0x4ce2d0-0x0;var _0x342656=_0xa866[_0x4ce2d0];return _0x342656;};'use strict';var _=require(_0x6a86('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x6a86('0x1'));var rs=require(_0x6a86('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6a86('0x3'))['db'];var utils=require(_0x6a86('0x4'));var logger=require(_0x6a86('0x5'))(_0x6a86('0x6'));var config=require('../../config/environment');var jayson=require(_0x6a86('0x7'));var client=jayson[_0x6a86('0x8')][_0x6a86('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4d0d6e,_0x8c9fc0,_0x10b61a){return new BPromise(function(_0x235659,_0x2dd460){return client[_0x6a86('0xa')](_0x4d0d6e,_0x10b61a)[_0x6a86('0xb')](function(_0x34a719){logger['info']('FaxQueueReport,\x20%s,\x20%s',_0x8c9fc0,'request\x20sent');logger[_0x6a86('0xc')](_0x6a86('0xd'),_0x8c9fc0,_0x6a86('0xe'),JSON[_0x6a86('0xf')](_0x34a719));if(_0x34a719[_0x6a86('0x10')]){if(_0x34a719[_0x6a86('0x10')][_0x6a86('0x11')]===0x1f4){logger[_0x6a86('0x10')](_0x6a86('0x12'),_0x8c9fc0,_0x34a719[_0x6a86('0x10')]['message']);return _0x2dd460(_0x34a719['error'][_0x6a86('0x13')]);}logger[_0x6a86('0x10')]('FaxQueueReport,\x20%s,\x20%s',_0x8c9fc0,_0x34a719[_0x6a86('0x10')][_0x6a86('0x13')]);return _0x235659(_0x34a719[_0x6a86('0x10')][_0x6a86('0x13')]);}else{logger[_0x6a86('0x14')]('FaxQueueReport,\x20%s,\x20%s',_0x8c9fc0,_0x6a86('0xe'));_0x235659(_0x34a719['result'][_0x6a86('0x13')]);}})[_0x6a86('0x15')](function(_0x5172a3){logger['error'](_0x6a86('0x12'),_0x8c9fc0,_0x5172a3);_0x2dd460(_0x5172a3);});});}exports['CreateFaxQueueReport']=function(_0x131a5f){var _0x4a9356=this;return new Promise(function(_0x44ab2f,_0x525eb1){return db[_0x6a86('0x16')][_0x6a86('0x17')](_0x131a5f[_0x6a86('0x18')],{'raw':_0x131a5f[_0x6a86('0x19')]?_0x131a5f[_0x6a86('0x19')][_0x6a86('0x1a')]===undefined?!![]:![]:!![]})[_0x6a86('0xb')](function(_0x49f3d0){logger['info'](_0x6a86('0x1b'),_0x131a5f);logger[_0x6a86('0xc')](_0x6a86('0x1b'),_0x131a5f,JSON['stringify'](_0x49f3d0));_0x44ab2f(_0x49f3d0);})[_0x6a86('0x15')](function(_0x8f480f){logger['error']('CreateFaxQueueReport',_0x8f480f[_0x6a86('0x13')],_0x131a5f);_0x525eb1(_0x4a9356[_0x6a86('0x10')](0x1f4,_0x8f480f[_0x6a86('0x13')]));});});};exports[_0x6a86('0x1c')]=function(_0x133753){var _0x3c48b8=this;return new Promise(function(_0x18ef5f,_0x41199e){return db['FaxQueueReport']['update'](_0x133753['body'],{'raw':_0x133753[_0x6a86('0x19')]?_0x133753[_0x6a86('0x19')][_0x6a86('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x133753[_0x6a86('0x19')]?_0x133753[_0x6a86('0x19')][_0x6a86('0x1d')]||null:null,'attributes':_0x133753[_0x6a86('0x19')]?_0x133753['options'][_0x6a86('0x1e')]||null:null,'limit':_0x133753[_0x6a86('0x19')]?_0x133753[_0x6a86('0x19')]['limit']||null:null})[_0x6a86('0xb')](function(_0x1ff062){logger['info']('UpdateFaxQueueReport',_0x133753);logger[_0x6a86('0xc')](_0x6a86('0x1c'),_0x133753,JSON['stringify'](_0x1ff062));_0x18ef5f(_0x1ff062);})[_0x6a86('0x15')](function(_0x1bc358){logger[_0x6a86('0x10')](_0x6a86('0x1c'),_0x1bc358[_0x6a86('0x13')],_0x133753);_0x41199e(_0x3c48b8[_0x6a86('0x10')](0x1f4,_0x1bc358[_0x6a86('0x13')]));});});};
\ No newline at end of file