Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / mailServerIn / mailServerIn.rpc.js
index 6aecb4c..9b8f011 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb58=['request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','MailServerIn','options','raw','attributes','limit','include','map','model','GetMailServerIn','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','then','info','MailServerIn,\x20%s,\x20%s'];(function(_0x33e834,_0x3c9c93){var _0x51f83b=function(_0x5e4155){while(--_0x5e4155){_0x33e834['push'](_0x33e834['shift']());}};_0x51f83b(++_0x3c9c93);}(_0xdb58,0x167));var _0x8db5=function(_0xd50f07,_0x5e3645){_0xd50f07=_0xd50f07-0x0;var _0x16afa8=_0xdb58[_0xd50f07];return _0x16afa8;};'use strict';var _=require(_0x8db5('0x0'));var util=require(_0x8db5('0x1'));var moment=require('moment');var BPromise=require(_0x8db5('0x2'));var rs=require(_0x8db5('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8db5('0x4'))['db'];var utils=require(_0x8db5('0x5'));var logger=require(_0x8db5('0x6'))(_0x8db5('0x7'));var config=require('../../config/environment');var jayson=require(_0x8db5('0x8'));var client=jayson['client'][_0x8db5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c7a57,_0x2ebc67,_0x4e07d7){return new BPromise(function(_0x188799,_0x50f3cc){return client['request'](_0x2c7a57,_0x4e07d7)[_0x8db5('0xa')](function(_0xeb937f){logger[_0x8db5('0xb')](_0x8db5('0xc'),_0x2ebc67,_0x8db5('0xd'));logger[_0x8db5('0xe')](_0x8db5('0xf'),_0x2ebc67,'request\x20sent',JSON[_0x8db5('0x10')](_0xeb937f));if(_0xeb937f[_0x8db5('0x11')]){if(_0xeb937f[_0x8db5('0x11')][_0x8db5('0x12')]===0x1f4){logger['error']('MailServerIn,\x20%s,\x20%s',_0x2ebc67,_0xeb937f[_0x8db5('0x11')]['message']);return _0x50f3cc(_0xeb937f[_0x8db5('0x11')][_0x8db5('0x13')]);}logger[_0x8db5('0x11')]('MailServerIn,\x20%s,\x20%s',_0x2ebc67,_0xeb937f[_0x8db5('0x11')][_0x8db5('0x13')]);return _0x188799(_0xeb937f[_0x8db5('0x11')]['message']);}else{logger[_0x8db5('0xb')](_0x8db5('0xc'),_0x2ebc67,_0x8db5('0xd'));_0x188799(_0xeb937f[_0x8db5('0x14')][_0x8db5('0x13')]);}})[_0x8db5('0x15')](function(_0x1ce240){logger[_0x8db5('0x11')](_0x8db5('0xc'),_0x2ebc67,_0x1ce240);_0x50f3cc(_0x1ce240);});});}exports['GetMailServerIn']=function(_0x3e9848){var _0x5c9fa8=this;return new Promise(function(_0x1d8b73,_0x2f15e6){return db[_0x8db5('0x16')]['findAll']({'raw':_0x3e9848[_0x8db5('0x17')]?_0x3e9848['options'][_0x8db5('0x18')]===undefined?!![]:![]:!![],'where':_0x3e9848['options']?_0x3e9848[_0x8db5('0x17')]['where']||null:null,'attributes':_0x3e9848[_0x8db5('0x17')]?_0x3e9848[_0x8db5('0x17')][_0x8db5('0x19')]||null:null,'limit':_0x3e9848[_0x8db5('0x17')]?_0x3e9848['options'][_0x8db5('0x1a')]||null:null,'include':_0x3e9848[_0x8db5('0x17')]?_0x3e9848[_0x8db5('0x17')][_0x8db5('0x1b')]?_[_0x8db5('0x1c')](_0x3e9848[_0x8db5('0x17')][_0x8db5('0x1b')],function(_0x13702c){return{'model':db[_0x13702c[_0x8db5('0x1d')]],'as':_0x13702c['as'],'attributes':_0x13702c[_0x8db5('0x19')],'include':_0x13702c[_0x8db5('0x1b')]?_[_0x8db5('0x1c')](_0x13702c[_0x8db5('0x1b')],function(_0x560683){return{'model':db[_0x560683[_0x8db5('0x1d')]],'as':_0x560683['as'],'attributes':_0x560683[_0x8db5('0x19')],'include':_0x560683[_0x8db5('0x1b')]?_['map'](_0x560683[_0x8db5('0x1b')],function(_0x47a5f4){return{'model':db[_0x47a5f4['model']],'as':_0x47a5f4['as'],'attributes':_0x47a5f4[_0x8db5('0x19')]};}):[]};}):[]};}):[]:[]})[_0x8db5('0xa')](function(_0x287456){logger[_0x8db5('0xb')](_0x8db5('0x1e'),_0x3e9848);logger['debug'](_0x8db5('0x1e'),_0x3e9848,JSON[_0x8db5('0x10')](_0x287456));_0x1d8b73(_0x287456);})[_0x8db5('0x15')](function(_0x248cae){logger[_0x8db5('0x11')](_0x8db5('0x1e'),_0x248cae[_0x8db5('0x13')],_0x3e9848);_0x2f15e6(_0x5c9fa8[_0x8db5('0x11')](0x1f4,_0x248cae[_0x8db5('0x13')]));});});};
\ No newline at end of file
+var _0x7c7b=['../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','MailServerIn,\x20%s,\x20%s','request\x20sent','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetMailServerIn','findAll','options','where','limit','include','map','model','attributes','debug','lodash','randomstring','../../mysqldb'];(function(_0x3cb8a0,_0x62c139){var _0x4b0d20=function(_0x23dff1){while(--_0x23dff1){_0x3cb8a0['push'](_0x3cb8a0['shift']());}};_0x4b0d20(++_0x62c139);}(_0x7c7b,0x1af));var _0xb7c7=function(_0xdf0c09,_0x8fbdd5){_0xdf0c09=_0xdf0c09-0x0;var _0x48f3c6=_0x7c7b[_0xdf0c09];return _0x48f3c6;};'use strict';var _=require(_0xb7c7('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xb7c7('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb7c7('0x2'))['db'];var utils=require(_0xb7c7('0x3'));var logger=require(_0xb7c7('0x4'))(_0xb7c7('0x5'));var config=require('../../config/environment');var jayson=require(_0xb7c7('0x6'));var client=jayson[_0xb7c7('0x7')][_0xb7c7('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x206265,_0x4d4b41,_0x56dcad){return new BPromise(function(_0x3fcd42,_0x2d14c6){return client[_0xb7c7('0x9')](_0x206265,_0x56dcad)[_0xb7c7('0xa')](function(_0x460ac7){logger[_0xb7c7('0xb')](_0xb7c7('0xc'),_0x4d4b41,_0xb7c7('0xd'));logger['debug'](_0xb7c7('0xe'),_0x4d4b41,_0xb7c7('0xd'),JSON[_0xb7c7('0xf')](_0x460ac7));if(_0x460ac7[_0xb7c7('0x10')]){if(_0x460ac7['error'][_0xb7c7('0x11')]===0x1f4){logger['error'](_0xb7c7('0xc'),_0x4d4b41,_0x460ac7[_0xb7c7('0x10')][_0xb7c7('0x12')]);return _0x2d14c6(_0x460ac7[_0xb7c7('0x10')][_0xb7c7('0x12')]);}logger['error'](_0xb7c7('0xc'),_0x4d4b41,_0x460ac7[_0xb7c7('0x10')][_0xb7c7('0x12')]);return _0x3fcd42(_0x460ac7[_0xb7c7('0x10')][_0xb7c7('0x12')]);}else{logger[_0xb7c7('0xb')](_0xb7c7('0xc'),_0x4d4b41,'request\x20sent');_0x3fcd42(_0x460ac7[_0xb7c7('0x13')][_0xb7c7('0x12')]);}})[_0xb7c7('0x14')](function(_0x3b6d65){logger[_0xb7c7('0x10')](_0xb7c7('0xc'),_0x4d4b41,_0x3b6d65);_0x2d14c6(_0x3b6d65);});});}exports[_0xb7c7('0x15')]=function(_0x4390e5){var _0x2257eb=this;return new Promise(function(_0xf68d64,_0x10269e){return db['MailServerIn'][_0xb7c7('0x16')]({'raw':_0x4390e5[_0xb7c7('0x17')]?_0x4390e5[_0xb7c7('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x4390e5[_0xb7c7('0x17')]?_0x4390e5['options'][_0xb7c7('0x18')]||null:null,'attributes':_0x4390e5[_0xb7c7('0x17')]?_0x4390e5[_0xb7c7('0x17')]['attributes']||null:null,'limit':_0x4390e5[_0xb7c7('0x17')]?_0x4390e5[_0xb7c7('0x17')][_0xb7c7('0x19')]||null:null,'include':_0x4390e5['options']?_0x4390e5[_0xb7c7('0x17')][_0xb7c7('0x1a')]?_[_0xb7c7('0x1b')](_0x4390e5[_0xb7c7('0x17')][_0xb7c7('0x1a')],function(_0x2f7ba6){return{'model':db[_0x2f7ba6[_0xb7c7('0x1c')]],'as':_0x2f7ba6['as'],'attributes':_0x2f7ba6['attributes'],'include':_0x2f7ba6['include']?_['map'](_0x2f7ba6['include'],function(_0x58bb10){return{'model':db[_0x58bb10[_0xb7c7('0x1c')]],'as':_0x58bb10['as'],'attributes':_0x58bb10[_0xb7c7('0x1d')],'include':_0x58bb10[_0xb7c7('0x1a')]?_[_0xb7c7('0x1b')](_0x58bb10[_0xb7c7('0x1a')],function(_0xbcc3aa){return{'model':db[_0xbcc3aa[_0xb7c7('0x1c')]],'as':_0xbcc3aa['as'],'attributes':_0xbcc3aa[_0xb7c7('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xb7c7('0xa')](function(_0x2f7c86){logger[_0xb7c7('0xb')](_0xb7c7('0x15'),_0x4390e5);logger[_0xb7c7('0x1e')](_0xb7c7('0x15'),_0x4390e5,JSON[_0xb7c7('0xf')](_0x2f7c86));_0xf68d64(_0x2f7c86);})['catch'](function(_0x3dc631){logger['error'](_0xb7c7('0x15'),_0x3dc631['message'],_0x4390e5);_0x10269e(_0x2257eb[_0xb7c7('0x10')](0x1f4,_0x3dc631[_0xb7c7('0x12')]));});});};
\ No newline at end of file