Built motion from commit 44b1f254.|2.6.26
[motion2.git] / server / api / mailServerIn / mailServerIn.rpc.js
index a07802b..8211b5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x652b=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','client','http','request','then','info','MailServerIn,\x20%s,\x20%s','request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetMailServerIn','MailServerIn','findAll','options','raw','attributes','limit','include','map','model','lodash'];(function(_0x46e315,_0x995d51){var _0x1c8918=function(_0x4db819){while(--_0x4db819){_0x46e315['push'](_0x46e315['shift']());}};_0x1c8918(++_0x995d51);}(_0x652b,0xd8));var _0xb652=function(_0xf0bc07,_0x510ebf){_0xf0bc07=_0xf0bc07-0x0;var _0x1c50c2=_0x652b[_0xf0bc07];return _0x1c50c2;};'use strict';var _=require(_0xb652('0x0'));var util=require('util');var moment=require(_0xb652('0x1'));var BPromise=require(_0xb652('0x2'));var rs=require(_0xb652('0x3'));var fs=require('fs');var Redis=require(_0xb652('0x4'));var db=require(_0xb652('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb652('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xb652('0x7')][_0xb652('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x47da9d,_0x1a9b58,_0x162e97){return new BPromise(function(_0xc036c,_0x424092){return client[_0xb652('0x9')](_0x47da9d,_0x162e97)[_0xb652('0xa')](function(_0x1b3703){logger[_0xb652('0xb')](_0xb652('0xc'),_0x1a9b58,_0xb652('0xd'));logger[_0xb652('0xe')](_0xb652('0xf'),_0x1a9b58,_0xb652('0xd'),JSON[_0xb652('0x10')](_0x1b3703));if(_0x1b3703[_0xb652('0x11')]){if(_0x1b3703[_0xb652('0x11')][_0xb652('0x12')]===0x1f4){logger['error'](_0xb652('0xc'),_0x1a9b58,_0x1b3703[_0xb652('0x11')][_0xb652('0x13')]);return _0x424092(_0x1b3703['error'][_0xb652('0x13')]);}logger[_0xb652('0x11')](_0xb652('0xc'),_0x1a9b58,_0x1b3703[_0xb652('0x11')][_0xb652('0x13')]);return _0xc036c(_0x1b3703[_0xb652('0x11')][_0xb652('0x13')]);}else{logger[_0xb652('0xb')](_0xb652('0xc'),_0x1a9b58,_0xb652('0xd'));_0xc036c(_0x1b3703['result']['message']);}})[_0xb652('0x14')](function(_0x16bd30){logger[_0xb652('0x11')](_0xb652('0xc'),_0x1a9b58,_0x16bd30);_0x424092(_0x16bd30);});});}exports[_0xb652('0x15')]=function(_0x2f04ee){var _0x5487f2=this;return new Promise(function(_0x46baea,_0x349b63){return db[_0xb652('0x16')][_0xb652('0x17')]({'raw':_0x2f04ee[_0xb652('0x18')]?_0x2f04ee[_0xb652('0x18')][_0xb652('0x19')]===undefined?!![]:![]:!![],'where':_0x2f04ee[_0xb652('0x18')]?_0x2f04ee[_0xb652('0x18')]['where']||null:null,'attributes':_0x2f04ee['options']?_0x2f04ee[_0xb652('0x18')][_0xb652('0x1a')]||null:null,'limit':_0x2f04ee[_0xb652('0x18')]?_0x2f04ee[_0xb652('0x18')][_0xb652('0x1b')]||null:null,'include':_0x2f04ee[_0xb652('0x18')]?_0x2f04ee['options'][_0xb652('0x1c')]?_[_0xb652('0x1d')](_0x2f04ee[_0xb652('0x18')][_0xb652('0x1c')],function(_0x2d440a){return{'model':db[_0x2d440a[_0xb652('0x1e')]],'as':_0x2d440a['as'],'attributes':_0x2d440a[_0xb652('0x1a')],'include':_0x2d440a[_0xb652('0x1c')]?_[_0xb652('0x1d')](_0x2d440a[_0xb652('0x1c')],function(_0x719f13){return{'model':db[_0x719f13[_0xb652('0x1e')]],'as':_0x719f13['as'],'attributes':_0x719f13[_0xb652('0x1a')],'include':_0x719f13['include']?_[_0xb652('0x1d')](_0x719f13['include'],function(_0x9ca854){return{'model':db[_0x9ca854[_0xb652('0x1e')]],'as':_0x9ca854['as'],'attributes':_0x9ca854[_0xb652('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xb652('0xa')](function(_0x59ac7c){logger[_0xb652('0xb')]('GetMailServerIn',_0x2f04ee);logger['debug'](_0xb652('0x15'),_0x2f04ee,JSON[_0xb652('0x10')](_0x59ac7c));_0x46baea(_0x59ac7c);})[_0xb652('0x14')](function(_0x48e13e){logger[_0xb652('0x11')]('GetMailServerIn',_0x48e13e['message'],_0x2f04ee);_0x349b63(_0x5487f2[_0xb652('0x11')](0x1f4,_0x48e13e[_0xb652('0x13')]));});});};
\ No newline at end of file
+var _0x923f=['util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','MailServerIn,\x20%s,\x20%s','debug','MailServerIn,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetMailServerIn','MailServerIn','options','raw','where','limit','include','map','attributes','model','lodash'];(function(_0x30eccd,_0x23aa4f){var _0x28cc46=function(_0xead786){while(--_0xead786){_0x30eccd['push'](_0x30eccd['shift']());}};_0x28cc46(++_0x23aa4f);}(_0x923f,0x7b));var _0xf923=function(_0x34353,_0x55ab02){_0x34353=_0x34353-0x0;var _0x4124db=_0x923f[_0x34353];return _0x4124db;};'use strict';var _=require(_0xf923('0x0'));var util=require(_0xf923('0x1'));var moment=require(_0xf923('0x2'));var BPromise=require(_0xf923('0x3'));var rs=require(_0xf923('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf923('0x5'))['db'];var utils=require(_0xf923('0x6'));var logger=require(_0xf923('0x7'))('rpc');var config=require(_0xf923('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xf923('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x30f2b7,_0x42738b,_0x19501c){return new BPromise(function(_0x3db5ab,_0x2cfc53){return client[_0xf923('0xa')](_0x30f2b7,_0x19501c)['then'](function(_0x3ab9b){logger['info'](_0xf923('0xb'),_0x42738b,'request\x20sent');logger[_0xf923('0xc')](_0xf923('0xd'),_0x42738b,_0xf923('0xe'),JSON[_0xf923('0xf')](_0x3ab9b));if(_0x3ab9b[_0xf923('0x10')]){if(_0x3ab9b['error'][_0xf923('0x11')]===0x1f4){logger[_0xf923('0x10')]('MailServerIn,\x20%s,\x20%s',_0x42738b,_0x3ab9b[_0xf923('0x10')]['message']);return _0x2cfc53(_0x3ab9b[_0xf923('0x10')]['message']);}logger[_0xf923('0x10')](_0xf923('0xb'),_0x42738b,_0x3ab9b[_0xf923('0x10')][_0xf923('0x12')]);return _0x3db5ab(_0x3ab9b[_0xf923('0x10')][_0xf923('0x12')]);}else{logger['info'](_0xf923('0xb'),_0x42738b,_0xf923('0xe'));_0x3db5ab(_0x3ab9b[_0xf923('0x13')][_0xf923('0x12')]);}})[_0xf923('0x14')](function(_0x259cc9){logger[_0xf923('0x10')](_0xf923('0xb'),_0x42738b,_0x259cc9);_0x2cfc53(_0x259cc9);});});}exports[_0xf923('0x15')]=function(_0x27068f){var _0xc66907=this;return new Promise(function(_0x4a457e,_0x5aacf3){return db[_0xf923('0x16')]['findAll']({'raw':_0x27068f[_0xf923('0x17')]?_0x27068f[_0xf923('0x17')][_0xf923('0x18')]===undefined?!![]:![]:!![],'where':_0x27068f[_0xf923('0x17')]?_0x27068f['options'][_0xf923('0x19')]||null:null,'attributes':_0x27068f[_0xf923('0x17')]?_0x27068f[_0xf923('0x17')]['attributes']||null:null,'limit':_0x27068f['options']?_0x27068f['options'][_0xf923('0x1a')]||null:null,'include':_0x27068f[_0xf923('0x17')]?_0x27068f['options'][_0xf923('0x1b')]?_[_0xf923('0x1c')](_0x27068f[_0xf923('0x17')][_0xf923('0x1b')],function(_0x27789f){return{'model':db[_0x27789f['model']],'as':_0x27789f['as'],'attributes':_0x27789f[_0xf923('0x1d')],'include':_0x27789f[_0xf923('0x1b')]?_[_0xf923('0x1c')](_0x27789f[_0xf923('0x1b')],function(_0x6843fa){return{'model':db[_0x6843fa[_0xf923('0x1e')]],'as':_0x6843fa['as'],'attributes':_0x6843fa['attributes'],'include':_0x6843fa[_0xf923('0x1b')]?_['map'](_0x6843fa['include'],function(_0x578c51){return{'model':db[_0x578c51[_0xf923('0x1e')]],'as':_0x578c51['as'],'attributes':_0x578c51[_0xf923('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5f4fa1){logger['info'](_0xf923('0x15'),_0x27068f);logger['debug'](_0xf923('0x15'),_0x27068f,JSON[_0xf923('0xf')](_0x5f4fa1));_0x4a457e(_0x5f4fa1);})['catch'](function(_0x299568){logger[_0xf923('0x10')](_0xf923('0x15'),_0x299568[_0xf923('0x12')],_0x27068f);_0x5aacf3(_0xc66907[_0xf923('0x10')](0x1f4,_0x299568['message']));});});};
\ No newline at end of file