Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index ca87d28..1545d32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc9cd=['UpdateMailApplication','update','options','raw','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','MailApplication,\x20%s,\x20%s','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x316904,_0x1e8b77){var _0xfa9a21=function(_0x2b75ae){while(--_0x2b75ae){_0x316904['push'](_0x316904['shift']());}};_0xfa9a21(++_0x1e8b77);}(_0xc9cd,0x17e));var _0xdc9c=function(_0x2afbb0,_0x44f16d){_0x2afbb0=_0x2afbb0-0x0;var _0x411ff2=_0xc9cd[_0x2afbb0];return _0x411ff2;};'use strict';var _=require(_0xdc9c('0x0'));var util=require(_0xdc9c('0x1'));var moment=require(_0xdc9c('0x2'));var BPromise=require(_0xdc9c('0x3'));var rs=require(_0xdc9c('0x4'));var fs=require('fs');var Redis=require(_0xdc9c('0x5'));var db=require(_0xdc9c('0x6'))['db'];var utils=require(_0xdc9c('0x7'));var logger=require(_0xdc9c('0x8'))(_0xdc9c('0x9'));var config=require('../../config/environment');var jayson=require(_0xdc9c('0xa'));var client=jayson[_0xdc9c('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0xc08169,_0x31ef2b,_0x3a0d52){return new BPromise(function(_0x11abcd,_0x2ff9d8){return client[_0xdc9c('0xc')](_0xc08169,_0x3a0d52)[_0xdc9c('0xd')](function(_0x333551){logger[_0xdc9c('0xe')](_0xdc9c('0xf'),_0x31ef2b,_0xdc9c('0x10'));logger[_0xdc9c('0x11')](_0xdc9c('0x12'),_0x31ef2b,_0xdc9c('0x10'),JSON[_0xdc9c('0x13')](_0x333551));if(_0x333551['error']){if(_0x333551[_0xdc9c('0x14')][_0xdc9c('0x15')]===0x1f4){logger['error'](_0xdc9c('0xf'),_0x31ef2b,_0x333551[_0xdc9c('0x14')]['message']);return _0x2ff9d8(_0x333551[_0xdc9c('0x14')][_0xdc9c('0x16')]);}logger['error'](_0xdc9c('0xf'),_0x31ef2b,_0x333551[_0xdc9c('0x14')][_0xdc9c('0x16')]);return _0x11abcd(_0x333551[_0xdc9c('0x14')][_0xdc9c('0x16')]);}else{logger[_0xdc9c('0xe')](_0xdc9c('0xf'),_0x31ef2b,_0xdc9c('0x10'));_0x11abcd(_0x333551[_0xdc9c('0x17')][_0xdc9c('0x16')]);}})['catch'](function(_0x52fb51){logger[_0xdc9c('0x14')](_0xdc9c('0xf'),_0x31ef2b,_0x52fb51);_0x2ff9d8(_0x52fb51);});});}exports[_0xdc9c('0x18')]=function(_0xd0487){var _0x142ba7=this;return new Promise(function(_0x2b7aac,_0x551f6e){return db['MailApplication'][_0xdc9c('0x19')](_0xd0487['body'],{'raw':_0xd0487[_0xdc9c('0x1a')]?_0xd0487['options'][_0xdc9c('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xd0487[_0xdc9c('0x1a')]?_0xd0487['options']['where']||null:null,'attributes':_0xd0487['options']?_0xd0487['options']['attributes']||null:null,'limit':_0xd0487['options']?_0xd0487[_0xdc9c('0x1a')][_0xdc9c('0x1c')]||null:null})[_0xdc9c('0xd')](function(_0x2094d6){logger[_0xdc9c('0xe')](_0xdc9c('0x18'),_0xd0487);logger[_0xdc9c('0x11')](_0xdc9c('0x18'),_0xd0487,JSON[_0xdc9c('0x13')](_0x2094d6));_0x2b7aac(_0x2094d6);})['catch'](function(_0x22f1f6){logger[_0xdc9c('0x14')]('UpdateMailApplication',_0x22f1f6[_0xdc9c('0x16')],_0xd0487);_0x551f6e(_0x142ba7['error'](0x1f4,_0x22f1f6[_0xdc9c('0x16')]));});});};
\ No newline at end of file
+var _0x6f67=['lodash','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','MailApplication,\x20%s,\x20%s,\x20%s','error','code','message','MailApplication,\x20%s,\x20%s','result','MailApplication','body','options','raw','where','attributes','limit','UpdateMailApplication','debug','catch'];(function(_0x5f4fc0,_0x30de12){var _0x1fe751=function(_0x597580){while(--_0x597580){_0x5f4fc0['push'](_0x5f4fc0['shift']());}};_0x1fe751(++_0x30de12);}(_0x6f67,0xf0));var _0x76f6=function(_0x595682,_0x23fd00){_0x595682=_0x595682-0x0;var _0x2eceac=_0x6f67[_0x595682];return _0x2eceac;};'use strict';var _=require(_0x76f6('0x0'));var util=require(_0x76f6('0x1'));var moment=require(_0x76f6('0x2'));var BPromise=require('bluebird');var rs=require(_0x76f6('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x76f6('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x76f6('0x5'))(_0x76f6('0x6'));var config=require(_0x76f6('0x7'));var jayson=require(_0x76f6('0x8'));var client=jayson['client'][_0x76f6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x352550,_0x2b74d8,_0x2c8884){return new BPromise(function(_0x20e27d,_0x4adf60){return client[_0x76f6('0xa')](_0x352550,_0x2c8884)[_0x76f6('0xb')](function(_0x3b6b96){logger[_0x76f6('0xc')]('MailApplication,\x20%s,\x20%s',_0x2b74d8,_0x76f6('0xd'));logger['debug'](_0x76f6('0xe'),_0x2b74d8,'request\x20sent',JSON['stringify'](_0x3b6b96));if(_0x3b6b96[_0x76f6('0xf')]){if(_0x3b6b96[_0x76f6('0xf')][_0x76f6('0x10')]===0x1f4){logger[_0x76f6('0xf')]('MailApplication,\x20%s,\x20%s',_0x2b74d8,_0x3b6b96[_0x76f6('0xf')][_0x76f6('0x11')]);return _0x4adf60(_0x3b6b96['error'][_0x76f6('0x11')]);}logger[_0x76f6('0xf')](_0x76f6('0x12'),_0x2b74d8,_0x3b6b96[_0x76f6('0xf')]['message']);return _0x20e27d(_0x3b6b96[_0x76f6('0xf')][_0x76f6('0x11')]);}else{logger[_0x76f6('0xc')](_0x76f6('0x12'),_0x2b74d8,_0x76f6('0xd'));_0x20e27d(_0x3b6b96[_0x76f6('0x13')][_0x76f6('0x11')]);}})['catch'](function(_0x442a85){logger[_0x76f6('0xf')](_0x76f6('0x12'),_0x2b74d8,_0x442a85);_0x4adf60(_0x442a85);});});}exports['UpdateMailApplication']=function(_0x2ed64c){var _0x2af9af=this;return new Promise(function(_0x414d66,_0x1c6730){return db[_0x76f6('0x14')]['update'](_0x2ed64c[_0x76f6('0x15')],{'raw':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x18')]||null:null,'attributes':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x19')]||null:null,'limit':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x1a')]||null:null})[_0x76f6('0xb')](function(_0x4e8f13){logger['info'](_0x76f6('0x1b'),_0x2ed64c);logger[_0x76f6('0x1c')](_0x76f6('0x1b'),_0x2ed64c,JSON['stringify'](_0x4e8f13));_0x414d66(_0x4e8f13);})[_0x76f6('0x1d')](function(_0xc98d1){logger[_0x76f6('0xf')](_0x76f6('0x1b'),_0xc98d1[_0x76f6('0x11')],_0x2ed64c);_0x1c6730(_0x2af9af['error'](0x1f4,_0xc98d1[_0x76f6('0x11')]));});});};
\ No newline at end of file