Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index 9c6f0af..652e554 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4155=['options','where','limit','debug','stringify','lodash','util','bluebird','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','MailApplication,\x20%s,\x20%s','MailApplication,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','UpdateMailApplication','MailApplication','update','body'];(function(_0x4b5787,_0x2c5aa2){var _0x827b80=function(_0x4cbe14){while(--_0x4cbe14){_0x4b5787['push'](_0x4b5787['shift']());}};_0x827b80(++_0x2c5aa2);}(_0x4155,0x11d));var _0x5415=function(_0x428bbd,_0x28d713){_0x428bbd=_0x428bbd-0x0;var _0x1302c0=_0x4155[_0x428bbd];return _0x1302c0;};'use strict';var _=require(_0x5415('0x0'));var util=require(_0x5415('0x1'));var moment=require('moment');var BPromise=require(_0x5415('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x5415('0x3'));var logger=require('../../config/logger')('rpc');var config=require(_0x5415('0x4'));var jayson=require(_0x5415('0x5'));var client=jayson[_0x5415('0x6')][_0x5415('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x353599,_0x3c91ea,_0x3e2364){return new BPromise(function(_0x20ed1b,_0x5b0a3b){return client[_0x5415('0x8')](_0x353599,_0x3e2364)[_0x5415('0x9')](function(_0x448b4f){logger[_0x5415('0xa')](_0x5415('0xb'),_0x3c91ea,'request\x20sent');logger['debug'](_0x5415('0xc'),_0x3c91ea,_0x5415('0xd'),JSON['stringify'](_0x448b4f));if(_0x448b4f[_0x5415('0xe')]){if(_0x448b4f['error'][_0x5415('0xf')]===0x1f4){logger[_0x5415('0xe')]('MailApplication,\x20%s,\x20%s',_0x3c91ea,_0x448b4f['error'][_0x5415('0x10')]);return _0x5b0a3b(_0x448b4f[_0x5415('0xe')][_0x5415('0x10')]);}logger[_0x5415('0xe')](_0x5415('0xb'),_0x3c91ea,_0x448b4f[_0x5415('0xe')][_0x5415('0x10')]);return _0x20ed1b(_0x448b4f[_0x5415('0xe')][_0x5415('0x10')]);}else{logger['info'](_0x5415('0xb'),_0x3c91ea,_0x5415('0xd'));_0x20ed1b(_0x448b4f[_0x5415('0x11')][_0x5415('0x10')]);}})[_0x5415('0x12')](function(_0x49cd16){logger[_0x5415('0xe')](_0x5415('0xb'),_0x3c91ea,_0x49cd16);_0x5b0a3b(_0x49cd16);});});}exports[_0x5415('0x13')]=function(_0x556164){var _0x254dd4=this;return new Promise(function(_0xda73c6,_0x12812f){return db[_0x5415('0x14')][_0x5415('0x15')](_0x556164[_0x5415('0x16')],{'raw':_0x556164[_0x5415('0x17')]?_0x556164[_0x5415('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x556164[_0x5415('0x17')]?_0x556164[_0x5415('0x17')][_0x5415('0x18')]||null:null,'attributes':_0x556164[_0x5415('0x17')]?_0x556164[_0x5415('0x17')]['attributes']||null:null,'limit':_0x556164[_0x5415('0x17')]?_0x556164[_0x5415('0x17')][_0x5415('0x19')]||null:null})[_0x5415('0x9')](function(_0x2a2656){logger['info'](_0x5415('0x13'),_0x556164);logger[_0x5415('0x1a')]('UpdateMailApplication',_0x556164,JSON[_0x5415('0x1b')](_0x2a2656));_0xda73c6(_0x2a2656);})[_0x5415('0x12')](function(_0x2ef327){logger[_0x5415('0xe')](_0x5415('0x13'),_0x2ef327[_0x5415('0x10')],_0x556164);_0x12812f(_0x254dd4['error'](0x1f4,_0x2ef327[_0x5415('0x10')]));});});};
\ No newline at end of file
+var _0x5dcd=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','request','info','MailApplication,\x20%s,\x20%s','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','error','message','result','catch','UpdateMailApplication','MailApplication','update','options','raw','attributes','limit','lodash','util'];(function(_0x132926,_0x1b2010){var _0x24f710=function(_0x12fdfa){while(--_0x12fdfa){_0x132926['push'](_0x132926['shift']());}};_0x24f710(++_0x1b2010);}(_0x5dcd,0xbb));var _0xd5dc=function(_0x3e6cfb,_0x452880){_0x3e6cfb=_0x3e6cfb-0x0;var _0x72a2cd=_0x5dcd[_0x3e6cfb];return _0x72a2cd;};'use strict';var _=require(_0xd5dc('0x0'));var util=require(_0xd5dc('0x1'));var moment=require(_0xd5dc('0x2'));var BPromise=require(_0xd5dc('0x3'));var rs=require(_0xd5dc('0x4'));var fs=require('fs');var Redis=require(_0xd5dc('0x5'));var db=require(_0xd5dc('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xd5dc('0x7'));var jayson=require(_0xd5dc('0x8'));var client=jayson[_0xd5dc('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x37a458,_0x3ff3fa,_0x381386){return new BPromise(function(_0x1ff327,_0x242c31){return client[_0xd5dc('0xa')](_0x37a458,_0x381386)['then'](function(_0x450b1c){logger[_0xd5dc('0xb')](_0xd5dc('0xc'),_0x3ff3fa,_0xd5dc('0xd'));logger[_0xd5dc('0xe')](_0xd5dc('0xf'),_0x3ff3fa,_0xd5dc('0xd'),JSON['stringify'](_0x450b1c));if(_0x450b1c[_0xd5dc('0x10')]){if(_0x450b1c[_0xd5dc('0x10')]['code']===0x1f4){logger['error'](_0xd5dc('0xc'),_0x3ff3fa,_0x450b1c['error'][_0xd5dc('0x11')]);return _0x242c31(_0x450b1c[_0xd5dc('0x10')][_0xd5dc('0x11')]);}logger[_0xd5dc('0x10')]('MailApplication,\x20%s,\x20%s',_0x3ff3fa,_0x450b1c[_0xd5dc('0x10')][_0xd5dc('0x11')]);return _0x1ff327(_0x450b1c[_0xd5dc('0x10')][_0xd5dc('0x11')]);}else{logger[_0xd5dc('0xb')]('MailApplication,\x20%s,\x20%s',_0x3ff3fa,_0xd5dc('0xd'));_0x1ff327(_0x450b1c[_0xd5dc('0x12')][_0xd5dc('0x11')]);}})[_0xd5dc('0x13')](function(_0x42c58e){logger[_0xd5dc('0x10')](_0xd5dc('0xc'),_0x3ff3fa,_0x42c58e);_0x242c31(_0x42c58e);});});}exports[_0xd5dc('0x14')]=function(_0xdd4dcf){var _0x302d1e=this;return new Promise(function(_0x58a1e5,_0x88ad1a){return db[_0xd5dc('0x15')][_0xd5dc('0x16')](_0xdd4dcf['body'],{'raw':_0xdd4dcf[_0xd5dc('0x17')]?_0xdd4dcf['options'][_0xd5dc('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xdd4dcf['options']?_0xdd4dcf[_0xd5dc('0x17')]['where']||null:null,'attributes':_0xdd4dcf['options']?_0xdd4dcf[_0xd5dc('0x17')][_0xd5dc('0x19')]||null:null,'limit':_0xdd4dcf[_0xd5dc('0x17')]?_0xdd4dcf['options'][_0xd5dc('0x1a')]||null:null})['then'](function(_0xe9733a){logger[_0xd5dc('0xb')](_0xd5dc('0x14'),_0xdd4dcf);logger[_0xd5dc('0xe')](_0xd5dc('0x14'),_0xdd4dcf,JSON['stringify'](_0xe9733a));_0x58a1e5(_0xe9733a);})[_0xd5dc('0x13')](function(_0x519171){logger[_0xd5dc('0x10')](_0xd5dc('0x14'),_0x519171[_0xd5dc('0x11')],_0xdd4dcf);_0x88ad1a(_0x302d1e[_0xd5dc('0x10')](0x1f4,_0x519171[_0xd5dc('0x11')]));});});};
\ No newline at end of file