Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index 6a81b66..b272dfd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x18f4=['update','options','attributes','then','debug','catch','UpdateMailApplication','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','info','MailApplication,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result'];(function(_0x3a36ab,_0x209461){var _0x1f27c4=function(_0x4745c4){while(--_0x4745c4){_0x3a36ab['push'](_0x3a36ab['shift']());}};_0x1f27c4(++_0x209461);}(_0x18f4,0x1b7));var _0x418f=function(_0xcca3e4,_0xeb08c0){_0xcca3e4=_0xcca3e4-0x0;var _0x10da4c=_0x18f4[_0xcca3e4];return _0x10da4c;};'use strict';var _=require(_0x418f('0x0'));var util=require(_0x418f('0x1'));var moment=require(_0x418f('0x2'));var BPromise=require('bluebird');var rs=require(_0x418f('0x3'));var fs=require('fs');var Redis=require(_0x418f('0x4'));var db=require(_0x418f('0x5'))['db'];var utils=require(_0x418f('0x6'));var logger=require(_0x418f('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x418f('0x8'));var client=jayson[_0x418f('0x9')][_0x418f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1006ef,_0x38ce0e,_0x4e0f23){return new BPromise(function(_0x259735,_0x2e323f){return client[_0x418f('0xb')](_0x1006ef,_0x4e0f23)['then'](function(_0x4c39cf){logger[_0x418f('0xc')](_0x418f('0xd'),_0x38ce0e,'request\x20sent');logger['debug']('MailApplication,\x20%s,\x20%s,\x20%s',_0x38ce0e,_0x418f('0xe'),JSON[_0x418f('0xf')](_0x4c39cf));if(_0x4c39cf[_0x418f('0x10')]){if(_0x4c39cf[_0x418f('0x10')][_0x418f('0x11')]===0x1f4){logger[_0x418f('0x10')](_0x418f('0xd'),_0x38ce0e,_0x4c39cf[_0x418f('0x10')][_0x418f('0x12')]);return _0x2e323f(_0x4c39cf[_0x418f('0x10')]['message']);}logger['error']('MailApplication,\x20%s,\x20%s',_0x38ce0e,_0x4c39cf[_0x418f('0x10')][_0x418f('0x12')]);return _0x259735(_0x4c39cf[_0x418f('0x10')][_0x418f('0x12')]);}else{logger[_0x418f('0xc')]('MailApplication,\x20%s,\x20%s',_0x38ce0e,'request\x20sent');_0x259735(_0x4c39cf[_0x418f('0x13')][_0x418f('0x12')]);}})['catch'](function(_0x5173b7){logger[_0x418f('0x10')](_0x418f('0xd'),_0x38ce0e,_0x5173b7);_0x2e323f(_0x5173b7);});});}exports['UpdateMailApplication']=function(_0x2183a3){var _0x262954=this;return new Promise(function(_0x11ac98,_0x174dd7){return db['MailApplication'][_0x418f('0x14')](_0x2183a3['body'],{'raw':_0x2183a3['options']?_0x2183a3['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2183a3[_0x418f('0x15')]?_0x2183a3['options']['where']||null:null,'attributes':_0x2183a3[_0x418f('0x15')]?_0x2183a3[_0x418f('0x15')][_0x418f('0x16')]||null:null,'limit':_0x2183a3['options']?_0x2183a3[_0x418f('0x15')]['limit']||null:null})[_0x418f('0x17')](function(_0x369bed){logger['info']('UpdateMailApplication',_0x2183a3);logger[_0x418f('0x18')]('UpdateMailApplication',_0x2183a3,JSON[_0x418f('0xf')](_0x369bed));_0x11ac98(_0x369bed);})[_0x418f('0x19')](function(_0x4dd5df){logger[_0x418f('0x10')](_0x418f('0x1a'),_0x4dd5df[_0x418f('0x12')],_0x2183a3);_0x174dd7(_0x262954[_0x418f('0x10')](0x1f4,_0x4dd5df[_0x418f('0x12')]));});});};
\ No newline at end of file
+var _0xbea5=['info','MailApplication,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','MailApplication','update','body','options','raw','where','limit','UpdateMailApplication','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','then'];(function(_0x426829,_0x5ccd00){var _0x35e0f8=function(_0x555ecc){while(--_0x555ecc){_0x426829['push'](_0x426829['shift']());}};_0x35e0f8(++_0x5ccd00);}(_0xbea5,0x7d));var _0x5bea=function(_0x109371,_0x441c8e){_0x109371=_0x109371-0x0;var _0x4fd858=_0xbea5[_0x109371];return _0x4fd858;};'use strict';var _=require(_0x5bea('0x0'));var util=require('util');var moment=require(_0x5bea('0x1'));var BPromise=require(_0x5bea('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5bea('0x3'));var db=require(_0x5bea('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x5bea('0x5'))(_0x5bea('0x6'));var config=require('../../config/environment');var jayson=require(_0x5bea('0x7'));var client=jayson['client'][_0x5bea('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x170d30,_0x3411a0,_0x48b392){return new BPromise(function(_0x10d5c9,_0x10d7f0){return client['request'](_0x170d30,_0x48b392)[_0x5bea('0x9')](function(_0x21e7ea){logger[_0x5bea('0xa')](_0x5bea('0xb'),_0x3411a0,_0x5bea('0xc'));logger['debug']('MailApplication,\x20%s,\x20%s,\x20%s',_0x3411a0,_0x5bea('0xc'),JSON[_0x5bea('0xd')](_0x21e7ea));if(_0x21e7ea['error']){if(_0x21e7ea[_0x5bea('0xe')][_0x5bea('0xf')]===0x1f4){logger[_0x5bea('0xe')](_0x5bea('0xb'),_0x3411a0,_0x21e7ea[_0x5bea('0xe')][_0x5bea('0x10')]);return _0x10d7f0(_0x21e7ea[_0x5bea('0xe')]['message']);}logger[_0x5bea('0xe')](_0x5bea('0xb'),_0x3411a0,_0x21e7ea[_0x5bea('0xe')]['message']);return _0x10d5c9(_0x21e7ea[_0x5bea('0xe')]['message']);}else{logger[_0x5bea('0xa')](_0x5bea('0xb'),_0x3411a0,_0x5bea('0xc'));_0x10d5c9(_0x21e7ea[_0x5bea('0x11')]['message']);}})[_0x5bea('0x12')](function(_0x532948){logger[_0x5bea('0xe')]('MailApplication,\x20%s,\x20%s',_0x3411a0,_0x532948);_0x10d7f0(_0x532948);});});}exports['UpdateMailApplication']=function(_0x48f038){var _0x15e213=this;return new Promise(function(_0x54476b,_0x118502){return db[_0x5bea('0x13')][_0x5bea('0x14')](_0x48f038[_0x5bea('0x15')],{'raw':_0x48f038[_0x5bea('0x16')]?_0x48f038[_0x5bea('0x16')][_0x5bea('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x48f038[_0x5bea('0x16')]?_0x48f038[_0x5bea('0x16')][_0x5bea('0x18')]||null:null,'attributes':_0x48f038[_0x5bea('0x16')]?_0x48f038[_0x5bea('0x16')]['attributes']||null:null,'limit':_0x48f038['options']?_0x48f038[_0x5bea('0x16')][_0x5bea('0x19')]||null:null})[_0x5bea('0x9')](function(_0x5614cf){logger[_0x5bea('0xa')](_0x5bea('0x1a'),_0x48f038);logger['debug'](_0x5bea('0x1a'),_0x48f038,JSON[_0x5bea('0xd')](_0x5614cf));_0x54476b(_0x5614cf);})['catch'](function(_0x22b71d){logger[_0x5bea('0xe')](_0x5bea('0x1a'),_0x22b71d[_0x5bea('0x10')],_0x48f038);_0x118502(_0x15e213[_0x5bea('0xe')](0x1f4,_0x22b71d[_0x5bea('0x10')]));});});};
\ No newline at end of file