Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index af01769..658ba91 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7cf=['FaxApplication,\x20%s,\x20%s','debug','stringify','error','code','message','UpdateFaxApplication','FaxApplication','update','body','options','raw','attributes','limit','then','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info'];(function(_0x5d60ac,_0x55ed24){var _0x37120e=function(_0x436ebb){while(--_0x436ebb){_0x5d60ac['push'](_0x5d60ac['shift']());}};_0x37120e(++_0x55ed24);}(_0xb7cf,0xca));var _0xfb7c=function(_0x5be3cc,_0x3b5c7d){_0x5be3cc=_0x5be3cc-0x0;var _0x1162a2=_0xb7cf[_0x5be3cc];return _0x1162a2;};'use strict';var _=require(_0xfb7c('0x0'));var util=require(_0xfb7c('0x1'));var moment=require(_0xfb7c('0x2'));var BPromise=require(_0xfb7c('0x3'));var rs=require(_0xfb7c('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfb7c('0x5'))['db'];var utils=require(_0xfb7c('0x6'));var logger=require(_0xfb7c('0x7'))(_0xfb7c('0x8'));var config=require(_0xfb7c('0x9'));var jayson=require(_0xfb7c('0xa'));var client=jayson[_0xfb7c('0xb')][_0xfb7c('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x41dcce,_0x2fd757,_0x3c21f3){return new BPromise(function(_0x34b889,_0x289874){return client[_0xfb7c('0xd')](_0x41dcce,_0x3c21f3)['then'](function(_0x13dcc3){logger[_0xfb7c('0xe')](_0xfb7c('0xf'),_0x2fd757,'request\x20sent');logger[_0xfb7c('0x10')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x2fd757,'request\x20sent',JSON[_0xfb7c('0x11')](_0x13dcc3));if(_0x13dcc3[_0xfb7c('0x12')]){if(_0x13dcc3[_0xfb7c('0x12')][_0xfb7c('0x13')]===0x1f4){logger[_0xfb7c('0x12')](_0xfb7c('0xf'),_0x2fd757,_0x13dcc3[_0xfb7c('0x12')][_0xfb7c('0x14')]);return _0x289874(_0x13dcc3['error'][_0xfb7c('0x14')]);}logger[_0xfb7c('0x12')]('FaxApplication,\x20%s,\x20%s',_0x2fd757,_0x13dcc3[_0xfb7c('0x12')][_0xfb7c('0x14')]);return _0x34b889(_0x13dcc3[_0xfb7c('0x12')][_0xfb7c('0x14')]);}else{logger[_0xfb7c('0xe')](_0xfb7c('0xf'),_0x2fd757,'request\x20sent');_0x34b889(_0x13dcc3['result'][_0xfb7c('0x14')]);}})['catch'](function(_0xa66d3a){logger[_0xfb7c('0x12')](_0xfb7c('0xf'),_0x2fd757,_0xa66d3a);_0x289874(_0xa66d3a);});});}exports[_0xfb7c('0x15')]=function(_0x493d7b){var _0x20115a=this;return new Promise(function(_0x4f0c3b,_0xa29a57){return db[_0xfb7c('0x16')][_0xfb7c('0x17')](_0x493d7b[_0xfb7c('0x18')],{'raw':_0x493d7b[_0xfb7c('0x19')]?_0x493d7b[_0xfb7c('0x19')][_0xfb7c('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x493d7b['options']?_0x493d7b[_0xfb7c('0x19')]['where']||null:null,'attributes':_0x493d7b[_0xfb7c('0x19')]?_0x493d7b[_0xfb7c('0x19')][_0xfb7c('0x1b')]||null:null,'limit':_0x493d7b[_0xfb7c('0x19')]?_0x493d7b[_0xfb7c('0x19')][_0xfb7c('0x1c')]||null:null})[_0xfb7c('0x1d')](function(_0x4875b8){logger[_0xfb7c('0xe')]('UpdateFaxApplication',_0x493d7b);logger[_0xfb7c('0x10')]('UpdateFaxApplication',_0x493d7b,JSON['stringify'](_0x4875b8));_0x4f0c3b(_0x4875b8);})[_0xfb7c('0x1e')](function(_0x37ee79){logger['error'](_0xfb7c('0x15'),_0x37ee79['message'],_0x493d7b);_0xa29a57(_0x20115a['error'](0x1f4,_0x37ee79[_0xfb7c('0x14')]));});});};
\ No newline at end of file
+var _0x3cde=['body','options','raw','where','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','request','then','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','UpdateFaxApplication','FaxApplication','update'];(function(_0x13659a,_0x41453c){var _0x4b1c49=function(_0x270c47){while(--_0x270c47){_0x13659a['push'](_0x13659a['shift']());}};_0x4b1c49(++_0x41453c);}(_0x3cde,0x1cf));var _0xe3cd=function(_0x1e0511,_0x57b46f){_0x1e0511=_0x1e0511-0x0;var _0x14f454=_0x3cde[_0x1e0511];return _0x14f454;};'use strict';var _=require(_0xe3cd('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xe3cd('0x1'));var rs=require(_0xe3cd('0x2'));var fs=require('fs');var Redis=require(_0xe3cd('0x3'));var db=require(_0xe3cd('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xe3cd('0x5'));var jayson=require(_0xe3cd('0x6'));var client=jayson[_0xe3cd('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x468492,_0x45c2e5,_0x13c386){return new BPromise(function(_0x27ca98,_0x26e16f){return client[_0xe3cd('0x8')](_0x468492,_0x13c386)[_0xe3cd('0x9')](function(_0x1e448a){logger['info'](_0xe3cd('0xa'),_0x45c2e5,_0xe3cd('0xb'));logger[_0xe3cd('0xc')](_0xe3cd('0xd'),_0x45c2e5,_0xe3cd('0xb'),JSON['stringify'](_0x1e448a));if(_0x1e448a['error']){if(_0x1e448a[_0xe3cd('0xe')][_0xe3cd('0xf')]===0x1f4){logger[_0xe3cd('0xe')](_0xe3cd('0xa'),_0x45c2e5,_0x1e448a[_0xe3cd('0xe')]['message']);return _0x26e16f(_0x1e448a[_0xe3cd('0xe')][_0xe3cd('0x10')]);}logger[_0xe3cd('0xe')](_0xe3cd('0xa'),_0x45c2e5,_0x1e448a[_0xe3cd('0xe')][_0xe3cd('0x10')]);return _0x27ca98(_0x1e448a[_0xe3cd('0xe')]['message']);}else{logger[_0xe3cd('0x11')](_0xe3cd('0xa'),_0x45c2e5,_0xe3cd('0xb'));_0x27ca98(_0x1e448a[_0xe3cd('0x12')][_0xe3cd('0x10')]);}})[_0xe3cd('0x13')](function(_0x3641d7){logger['error'](_0xe3cd('0xa'),_0x45c2e5,_0x3641d7);_0x26e16f(_0x3641d7);});});}exports[_0xe3cd('0x14')]=function(_0x21ea21){var _0x498bc4=this;return new Promise(function(_0x414780,_0x4a16ca){return db[_0xe3cd('0x15')][_0xe3cd('0x16')](_0x21ea21[_0xe3cd('0x17')],{'raw':_0x21ea21[_0xe3cd('0x18')]?_0x21ea21[_0xe3cd('0x18')][_0xe3cd('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x21ea21[_0xe3cd('0x18')]?_0x21ea21['options'][_0xe3cd('0x1a')]||null:null,'attributes':_0x21ea21[_0xe3cd('0x18')]?_0x21ea21['options']['attributes']||null:null,'limit':_0x21ea21[_0xe3cd('0x18')]?_0x21ea21[_0xe3cd('0x18')]['limit']||null:null})[_0xe3cd('0x9')](function(_0x2dc337){logger[_0xe3cd('0x11')](_0xe3cd('0x14'),_0x21ea21);logger[_0xe3cd('0xc')](_0xe3cd('0x14'),_0x21ea21,JSON['stringify'](_0x2dc337));_0x414780(_0x2dc337);})[_0xe3cd('0x13')](function(_0x4c63b3){logger['error']('UpdateFaxApplication',_0x4c63b3[_0xe3cd('0x10')],_0x21ea21);_0x4a16ca(_0x498bc4[_0xe3cd('0xe')](0x1f4,_0x4c63b3['message']));});});};
\ No newline at end of file