Built motion from commit 497d3d92.|2.5.43
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index 9b79db6..64f6bca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x67ac=['request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','MailApplication','update','body','options','raw','where','limit','UpdateMailApplication','lodash','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','MailApplication,\x20%s,\x20%s'];(function(_0x310c57,_0x44fee1){var _0x41a80e=function(_0x27643d){while(--_0x27643d){_0x310c57['push'](_0x310c57['shift']());}};_0x41a80e(++_0x44fee1);}(_0x67ac,0xc5));var _0xc67a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x67ac[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xc67a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc67a('0x1'));var db=require(_0xc67a('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0xc67a('0x3'))('rpc');var config=require(_0xc67a('0x4'));var jayson=require(_0xc67a('0x5'));var client=jayson[_0xc67a('0x6')][_0xc67a('0x7')]({'port':0x232a});function respondWithRpcPromise(_0xebf28e,_0x217e74,_0x54883c){return new BPromise(function(_0x40d137,_0x116653){return client['request'](_0xebf28e,_0x54883c)[_0xc67a('0x8')](function(_0x18f2d9){logger[_0xc67a('0x9')](_0xc67a('0xa'),_0x217e74,_0xc67a('0xb'));logger[_0xc67a('0xc')](_0xc67a('0xd'),_0x217e74,'request\x20sent',JSON[_0xc67a('0xe')](_0x18f2d9));if(_0x18f2d9[_0xc67a('0xf')]){if(_0x18f2d9['error']['code']===0x1f4){logger[_0xc67a('0xf')]('MailApplication,\x20%s,\x20%s',_0x217e74,_0x18f2d9[_0xc67a('0xf')]['message']);return _0x116653(_0x18f2d9[_0xc67a('0xf')][_0xc67a('0x10')]);}logger['error'](_0xc67a('0xa'),_0x217e74,_0x18f2d9['error'][_0xc67a('0x10')]);return _0x40d137(_0x18f2d9[_0xc67a('0xf')]['message']);}else{logger['info'](_0xc67a('0xa'),_0x217e74,_0xc67a('0xb'));_0x40d137(_0x18f2d9['result'][_0xc67a('0x10')]);}})[_0xc67a('0x11')](function(_0x414785){logger['error'](_0xc67a('0xa'),_0x217e74,_0x414785);_0x116653(_0x414785);});});}exports['UpdateMailApplication']=function(_0x95f834){var _0x1cd624=this;return new Promise(function(_0xc017f,_0x4ba26b){return db[_0xc67a('0x12')][_0xc67a('0x13')](_0x95f834[_0xc67a('0x14')],{'raw':_0x95f834['options']?_0x95f834[_0xc67a('0x15')][_0xc67a('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x95f834[_0xc67a('0x15')]?_0x95f834[_0xc67a('0x15')][_0xc67a('0x17')]||null:null,'attributes':_0x95f834[_0xc67a('0x15')]?_0x95f834['options']['attributes']||null:null,'limit':_0x95f834[_0xc67a('0x15')]?_0x95f834['options'][_0xc67a('0x18')]||null:null})[_0xc67a('0x8')](function(_0x1bc37f){logger[_0xc67a('0x9')](_0xc67a('0x19'),_0x95f834);logger['debug'](_0xc67a('0x19'),_0x95f834,JSON['stringify'](_0x1bc37f));_0xc017f(_0x1bc37f);})['catch'](function(_0x11c54b){logger[_0xc67a('0xf')](_0xc67a('0x19'),_0x11c54b['message'],_0x95f834);_0x4ba26b(_0x1cd624[_0xc67a('0xf')](0x1f4,_0x11c54b[_0xc67a('0x10')]));});});};
\ No newline at end of file
+var _0xf042=['error','code','MailApplication,\x20%s,\x20%s','message','result','catch','UpdateMailApplication','MailApplication','update','body','options','raw','limit','stringify','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug'];(function(_0x35d8af,_0x14fd75){var _0x1d08b0=function(_0x36b437){while(--_0x36b437){_0x35d8af['push'](_0x35d8af['shift']());}};_0x1d08b0(++_0x14fd75);}(_0xf042,0xfe));var _0x2f04=function(_0x435a17,_0x1e46b8){_0x435a17=_0x435a17-0x0;var _0x5de40e=_0xf042[_0x435a17];return _0x5de40e;};'use strict';var _=require(_0x2f04('0x0'));var util=require(_0x2f04('0x1'));var moment=require(_0x2f04('0x2'));var BPromise=require('bluebird');var rs=require(_0x2f04('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2f04('0x4'))['db'];var utils=require(_0x2f04('0x5'));var logger=require(_0x2f04('0x6'))(_0x2f04('0x7'));var config=require(_0x2f04('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x2f04('0x9')][_0x2f04('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe8c454,_0x5ce463,_0x460e31){return new BPromise(function(_0x2d17cd,_0x11be05){return client[_0x2f04('0xb')](_0xe8c454,_0x460e31)[_0x2f04('0xc')](function(_0x22ecbd){logger[_0x2f04('0xd')]('MailApplication,\x20%s,\x20%s',_0x5ce463,_0x2f04('0xe'));logger[_0x2f04('0xf')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x5ce463,_0x2f04('0xe'),JSON['stringify'](_0x22ecbd));if(_0x22ecbd[_0x2f04('0x10')]){if(_0x22ecbd[_0x2f04('0x10')][_0x2f04('0x11')]===0x1f4){logger['error'](_0x2f04('0x12'),_0x5ce463,_0x22ecbd[_0x2f04('0x10')][_0x2f04('0x13')]);return _0x11be05(_0x22ecbd[_0x2f04('0x10')][_0x2f04('0x13')]);}logger['error'](_0x2f04('0x12'),_0x5ce463,_0x22ecbd[_0x2f04('0x10')][_0x2f04('0x13')]);return _0x2d17cd(_0x22ecbd['error'][_0x2f04('0x13')]);}else{logger[_0x2f04('0xd')](_0x2f04('0x12'),_0x5ce463,_0x2f04('0xe'));_0x2d17cd(_0x22ecbd[_0x2f04('0x14')][_0x2f04('0x13')]);}})[_0x2f04('0x15')](function(_0x332a56){logger['error'](_0x2f04('0x12'),_0x5ce463,_0x332a56);_0x11be05(_0x332a56);});});}exports[_0x2f04('0x16')]=function(_0x35245e){var _0x2f70a8=this;return new Promise(function(_0x3ae65c,_0x473956){return db[_0x2f04('0x17')][_0x2f04('0x18')](_0x35245e[_0x2f04('0x19')],{'raw':_0x35245e[_0x2f04('0x1a')]?_0x35245e[_0x2f04('0x1a')][_0x2f04('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x35245e['options']?_0x35245e[_0x2f04('0x1a')]['where']||null:null,'attributes':_0x35245e[_0x2f04('0x1a')]?_0x35245e['options']['attributes']||null:null,'limit':_0x35245e[_0x2f04('0x1a')]?_0x35245e[_0x2f04('0x1a')][_0x2f04('0x1c')]||null:null})[_0x2f04('0xc')](function(_0x15042d){logger[_0x2f04('0xd')](_0x2f04('0x16'),_0x35245e);logger['debug'](_0x2f04('0x16'),_0x35245e,JSON[_0x2f04('0x1d')](_0x15042d));_0x3ae65c(_0x15042d);})[_0x2f04('0x15')](function(_0x476f26){logger[_0x2f04('0x10')]('UpdateMailApplication',_0x476f26[_0x2f04('0x13')],_0x35245e);_0x473956(_0x2f70a8[_0x2f04('0x10')](0x1f4,_0x476f26['message']));});});};
\ No newline at end of file