Built motion from commit a61a4a20.|2.5.46
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index 3535888..a8e383a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa378=['rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','FaxApplication,\x20%s,\x20%s','message','result','catch','UpdateFaxApplication','FaxApplication','update','options','raw','where','attributes','limit','lodash','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0xa378,0x191));var _0x8a37=function(_0x4074d5,_0x1985cc){_0x4074d5=_0x4074d5-0x0;var _0x13c1f0=_0xa378[_0x4074d5];return _0x13c1f0;};'use strict';var _=require(_0x8a37('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x8a37('0x1'));var rs=require(_0x8a37('0x2'));var fs=require('fs');var Redis=require(_0x8a37('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x8a37('0x4'));var logger=require('../../config/logger')(_0x8a37('0x5'));var config=require('../../config/environment');var jayson=require(_0x8a37('0x6'));var client=jayson[_0x8a37('0x7')][_0x8a37('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x49d70c,_0x52c26e,_0x5c0659){return new BPromise(function(_0x3a2e89,_0x11d438){return client[_0x8a37('0x9')](_0x49d70c,_0x5c0659)[_0x8a37('0xa')](function(_0x30733e){logger[_0x8a37('0xb')]('FaxApplication,\x20%s,\x20%s',_0x52c26e,_0x8a37('0xc'));logger[_0x8a37('0xd')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x52c26e,_0x8a37('0xc'),JSON[_0x8a37('0xe')](_0x30733e));if(_0x30733e['error']){if(_0x30733e[_0x8a37('0xf')][_0x8a37('0x10')]===0x1f4){logger['error'](_0x8a37('0x11'),_0x52c26e,_0x30733e['error']['message']);return _0x11d438(_0x30733e[_0x8a37('0xf')][_0x8a37('0x12')]);}logger[_0x8a37('0xf')](_0x8a37('0x11'),_0x52c26e,_0x30733e[_0x8a37('0xf')][_0x8a37('0x12')]);return _0x3a2e89(_0x30733e[_0x8a37('0xf')]['message']);}else{logger[_0x8a37('0xb')](_0x8a37('0x11'),_0x52c26e,_0x8a37('0xc'));_0x3a2e89(_0x30733e[_0x8a37('0x13')][_0x8a37('0x12')]);}})[_0x8a37('0x14')](function(_0x4865ee){logger['error'](_0x8a37('0x11'),_0x52c26e,_0x4865ee);_0x11d438(_0x4865ee);});});}exports[_0x8a37('0x15')]=function(_0x462bc7){var _0x56bdc5=this;return new Promise(function(_0x5093ae,_0x12c663){return db[_0x8a37('0x16')][_0x8a37('0x17')](_0x462bc7['body'],{'raw':_0x462bc7['options']?_0x462bc7[_0x8a37('0x18')][_0x8a37('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x462bc7[_0x8a37('0x18')]?_0x462bc7[_0x8a37('0x18')][_0x8a37('0x1a')]||null:null,'attributes':_0x462bc7[_0x8a37('0x18')]?_0x462bc7['options'][_0x8a37('0x1b')]||null:null,'limit':_0x462bc7[_0x8a37('0x18')]?_0x462bc7[_0x8a37('0x18')][_0x8a37('0x1c')]||null:null})[_0x8a37('0xa')](function(_0x4c85e9){logger[_0x8a37('0xb')]('UpdateFaxApplication',_0x462bc7);logger[_0x8a37('0xd')](_0x8a37('0x15'),_0x462bc7,JSON[_0x8a37('0xe')](_0x4c85e9));_0x5093ae(_0x4c85e9);})['catch'](function(_0x3bedd2){logger[_0x8a37('0xf')]('UpdateFaxApplication',_0x3bedd2[_0x8a37('0x12')],_0x462bc7);_0x12c663(_0x56bdc5[_0x8a37('0xf')](0x1f4,_0x3bedd2[_0x8a37('0x12')]));});});};
\ No newline at end of file
+var _0xa70f=['debug','FaxApplication,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','UpdateFaxApplication','options','where','attributes','limit','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','request','then','info','FaxApplication,\x20%s,\x20%s'];(function(_0x4c9c28,_0x4c6af4){var _0x58d45=function(_0x4683d2){while(--_0x4683d2){_0x4c9c28['push'](_0x4c9c28['shift']());}};_0x58d45(++_0x4c6af4);}(_0xa70f,0xb4));var _0xfa70=function(_0x336265,_0x131fc2){_0x336265=_0x336265-0x0;var _0x4b1a4b=_0xa70f[_0x336265];return _0x4b1a4b;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xfa70('0x0'));var rs=require(_0xfa70('0x1'));var fs=require('fs');var Redis=require(_0xfa70('0x2'));var db=require(_0xfa70('0x3'))['db'];var utils=require(_0xfa70('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xfa70('0x5'));var client=jayson[_0xfa70('0x6')][_0xfa70('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2fd406,_0xae7c5,_0x527aa1){return new BPromise(function(_0x5c5bb4,_0x46fbac){return client[_0xfa70('0x8')](_0x2fd406,_0x527aa1)[_0xfa70('0x9')](function(_0x210a44){logger[_0xfa70('0xa')](_0xfa70('0xb'),_0xae7c5,'request\x20sent');logger[_0xfa70('0xc')](_0xfa70('0xd'),_0xae7c5,'request\x20sent',JSON['stringify'](_0x210a44));if(_0x210a44[_0xfa70('0xe')]){if(_0x210a44['error'][_0xfa70('0xf')]===0x1f4){logger[_0xfa70('0xe')](_0xfa70('0xb'),_0xae7c5,_0x210a44[_0xfa70('0xe')][_0xfa70('0x10')]);return _0x46fbac(_0x210a44[_0xfa70('0xe')][_0xfa70('0x10')]);}logger[_0xfa70('0xe')](_0xfa70('0xb'),_0xae7c5,_0x210a44['error'][_0xfa70('0x10')]);return _0x5c5bb4(_0x210a44[_0xfa70('0xe')]['message']);}else{logger[_0xfa70('0xa')](_0xfa70('0xb'),_0xae7c5,'request\x20sent');_0x5c5bb4(_0x210a44[_0xfa70('0x11')][_0xfa70('0x10')]);}})[_0xfa70('0x12')](function(_0x3b4496){logger[_0xfa70('0xe')](_0xfa70('0xb'),_0xae7c5,_0x3b4496);_0x46fbac(_0x3b4496);});});}exports[_0xfa70('0x13')]=function(_0x1f6660){var _0x5baa43=this;return new Promise(function(_0x55e2ef,_0x1da480){return db['FaxApplication']['update'](_0x1f6660['body'],{'raw':_0x1f6660[_0xfa70('0x14')]?_0x1f6660[_0xfa70('0x14')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1f6660[_0xfa70('0x14')]?_0x1f6660[_0xfa70('0x14')][_0xfa70('0x15')]||null:null,'attributes':_0x1f6660[_0xfa70('0x14')]?_0x1f6660[_0xfa70('0x14')][_0xfa70('0x16')]||null:null,'limit':_0x1f6660[_0xfa70('0x14')]?_0x1f6660[_0xfa70('0x14')][_0xfa70('0x17')]||null:null})['then'](function(_0x123c30){logger[_0xfa70('0xa')]('UpdateFaxApplication',_0x1f6660);logger[_0xfa70('0xc')](_0xfa70('0x13'),_0x1f6660,JSON['stringify'](_0x123c30));_0x55e2ef(_0x123c30);})[_0xfa70('0x12')](function(_0x4c836c){logger['error'](_0xfa70('0x13'),_0x4c836c[_0xfa70('0x10')],_0x1f6660);_0x1da480(_0x5baa43[_0xfa70('0xe')](0x1f4,_0x4c836c[_0xfa70('0x10')]));});});};
\ No newline at end of file