Built motion from commit 43538d75.|2.5.35
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index aa1043e..b56e789 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8519=['message','result','catch','UpdateMailApplication','body','options','raw','where','limit','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','MailApplication,\x20%s,\x20%s','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x45d55e,_0x2fede3){var _0x29812a=function(_0x3c6830){while(--_0x3c6830){_0x45d55e['push'](_0x45d55e['shift']());}};_0x29812a(++_0x2fede3);}(_0x8519,0x1ad));var _0x9851=function(_0x51a19a,_0x4891d1){_0x51a19a=_0x51a19a-0x0;var _0x1fa624=_0x8519[_0x51a19a];return _0x1fa624;};'use strict';var _=require('lodash');var util=require(_0x9851('0x0'));var moment=require(_0x9851('0x1'));var BPromise=require(_0x9851('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9851('0x3'));var db=require(_0x9851('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x9851('0x5'))(_0x9851('0x6'));var config=require(_0x9851('0x7'));var jayson=require(_0x9851('0x8'));var client=jayson[_0x9851('0x9')][_0x9851('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1c665c,_0x549d21,_0x217f20){return new BPromise(function(_0x34a606,_0x12fe6c){return client[_0x9851('0xb')](_0x1c665c,_0x217f20)['then'](function(_0x828adf){logger[_0x9851('0xc')](_0x9851('0xd'),_0x549d21,_0x9851('0xe'));logger[_0x9851('0xf')](_0x9851('0x10'),_0x549d21,_0x9851('0xe'),JSON[_0x9851('0x11')](_0x828adf));if(_0x828adf[_0x9851('0x12')]){if(_0x828adf[_0x9851('0x12')]['code']===0x1f4){logger[_0x9851('0x12')](_0x9851('0xd'),_0x549d21,_0x828adf[_0x9851('0x12')][_0x9851('0x13')]);return _0x12fe6c(_0x828adf[_0x9851('0x12')][_0x9851('0x13')]);}logger[_0x9851('0x12')](_0x9851('0xd'),_0x549d21,_0x828adf[_0x9851('0x12')]['message']);return _0x34a606(_0x828adf[_0x9851('0x12')][_0x9851('0x13')]);}else{logger[_0x9851('0xc')](_0x9851('0xd'),_0x549d21,_0x9851('0xe'));_0x34a606(_0x828adf[_0x9851('0x14')][_0x9851('0x13')]);}})[_0x9851('0x15')](function(_0x1cd8a9){logger[_0x9851('0x12')](_0x9851('0xd'),_0x549d21,_0x1cd8a9);_0x12fe6c(_0x1cd8a9);});});}exports[_0x9851('0x16')]=function(_0x39101b){var _0x5620ed=this;return new Promise(function(_0x11ad99,_0x1ce07a){return db['MailApplication']['update'](_0x39101b[_0x9851('0x17')],{'raw':_0x39101b[_0x9851('0x18')]?_0x39101b[_0x9851('0x18')][_0x9851('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x39101b['options']?_0x39101b[_0x9851('0x18')][_0x9851('0x1a')]||null:null,'attributes':_0x39101b['options']?_0x39101b[_0x9851('0x18')]['attributes']||null:null,'limit':_0x39101b['options']?_0x39101b[_0x9851('0x18')][_0x9851('0x1b')]||null:null})['then'](function(_0x1b5af6){logger['info']('UpdateMailApplication',_0x39101b);logger[_0x9851('0xf')](_0x9851('0x16'),_0x39101b,JSON[_0x9851('0x11')](_0x1b5af6));_0x11ad99(_0x1b5af6);})[_0x9851('0x15')](function(_0x29890f){logger[_0x9851('0x12')](_0x9851('0x16'),_0x29890f[_0x9851('0x13')],_0x39101b);_0x1ce07a(_0x5620ed[_0x9851('0x12')](0x1f4,_0x29890f[_0x9851('0x13')]));});});};
\ No newline at end of file
+var _0x6551=['../../config/environment','jayson/promise','client','request','then','info','MailApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','UpdateMailApplication','MailApplication','update','body','options','raw','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0xfd0dbc,_0x2a8b40){var _0x4580de=function(_0x475c7a){while(--_0x475c7a){_0xfd0dbc['push'](_0xfd0dbc['shift']());}};_0x4580de(++_0x2a8b40);}(_0x6551,0xb1));var _0x1655=function(_0x36d86f,_0x437cfa){_0x36d86f=_0x36d86f-0x0;var _0x431b64=_0x6551[_0x36d86f];return _0x431b64;};'use strict';var _=require(_0x1655('0x0'));var util=require(_0x1655('0x1'));var moment=require(_0x1655('0x2'));var BPromise=require(_0x1655('0x3'));var rs=require(_0x1655('0x4'));var fs=require('fs');var Redis=require(_0x1655('0x5'));var db=require(_0x1655('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x1655('0x7'))(_0x1655('0x8'));var config=require(_0x1655('0x9'));var jayson=require(_0x1655('0xa'));var client=jayson[_0x1655('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4befac,_0x2d81a3,_0x437c09){return new BPromise(function(_0x25fc3d,_0x40efa5){return client[_0x1655('0xc')](_0x4befac,_0x437c09)[_0x1655('0xd')](function(_0x986bd5){logger[_0x1655('0xe')](_0x1655('0xf'),_0x2d81a3,_0x1655('0x10'));logger[_0x1655('0x11')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x2d81a3,_0x1655('0x10'),JSON[_0x1655('0x12')](_0x986bd5));if(_0x986bd5[_0x1655('0x13')]){if(_0x986bd5[_0x1655('0x13')][_0x1655('0x14')]===0x1f4){logger[_0x1655('0x13')](_0x1655('0xf'),_0x2d81a3,_0x986bd5[_0x1655('0x13')][_0x1655('0x15')]);return _0x40efa5(_0x986bd5['error'][_0x1655('0x15')]);}logger['error'](_0x1655('0xf'),_0x2d81a3,_0x986bd5[_0x1655('0x13')][_0x1655('0x15')]);return _0x25fc3d(_0x986bd5[_0x1655('0x13')]['message']);}else{logger['info']('MailApplication,\x20%s,\x20%s',_0x2d81a3,_0x1655('0x10'));_0x25fc3d(_0x986bd5['result']['message']);}})[_0x1655('0x16')](function(_0xc19a57){logger['error'](_0x1655('0xf'),_0x2d81a3,_0xc19a57);_0x40efa5(_0xc19a57);});});}exports[_0x1655('0x17')]=function(_0x33cfd8){var _0x34e1f8=this;return new Promise(function(_0x528baa,_0x11be5e){return db[_0x1655('0x18')][_0x1655('0x19')](_0x33cfd8[_0x1655('0x1a')],{'raw':_0x33cfd8['options']?_0x33cfd8[_0x1655('0x1b')][_0x1655('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x33cfd8[_0x1655('0x1b')]?_0x33cfd8[_0x1655('0x1b')][_0x1655('0x1d')]||null:null,'attributes':_0x33cfd8[_0x1655('0x1b')]?_0x33cfd8[_0x1655('0x1b')]['attributes']||null:null,'limit':_0x33cfd8['options']?_0x33cfd8[_0x1655('0x1b')][_0x1655('0x1e')]||null:null})[_0x1655('0xd')](function(_0x154367){logger['info']('UpdateMailApplication',_0x33cfd8);logger[_0x1655('0x11')]('UpdateMailApplication',_0x33cfd8,JSON[_0x1655('0x12')](_0x154367));_0x528baa(_0x154367);})['catch'](function(_0x348d27){logger[_0x1655('0x13')](_0x1655('0x17'),_0x348d27[_0x1655('0x15')],_0x33cfd8);_0x11be5e(_0x34e1f8['error'](0x1f4,_0x348d27[_0x1655('0x15')]));});});};
\ No newline at end of file