Built motion from commit (unavailable).|2.5.17
[motion2.git] / server / api / mailMessage / mailMessage.rpc.js
index 777ee38..a9d9209 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe42c=['raw','then','info','debug','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','register','request','MailMessage,\x20%s,\x20%s','request\x20sent','MailMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateMailMessage','body','options'];(function(_0x242391,_0xab826){var _0x1734f0=function(_0x16c72e){while(--_0x16c72e){_0x242391['push'](_0x242391['shift']());}};_0x1734f0(++_0xab826);}(_0xe42c,0x149));var _0xce42=function(_0x20b06c,_0x48d7ed){_0x20b06c=_0x20b06c-0x0;var _0x3ed917=_0xe42c[_0x20b06c];return _0x3ed917;};'use strict';var _=require(_0xce42('0x0'));var util=require(_0xce42('0x1'));var moment=require(_0xce42('0x2'));var BPromise=require(_0xce42('0x3'));var rs=require(_0xce42('0x4'));var fs=require('fs');var Redis=require(_0xce42('0x5'));var db=require(_0xce42('0x6'))['db'];var utils=require(_0xce42('0x7'));var logger=require(_0xce42('0x8'))('rpc');var config=require(_0xce42('0x9'));var jayson=require(_0xce42('0xa'));var client=jayson[_0xce42('0xb')][_0xce42('0xc')]({'port':0x232a});config[_0xce42('0xd')]=_[_0xce42('0xe')](config[_0xce42('0xd')],{'host':_0xce42('0xf'),'port':0x18eb});var socket=require(_0xce42('0x10'))(new Redis(config[_0xce42('0xd')]));require(_0xce42('0x11'))[_0xce42('0x12')](socket);function respondWithRpcPromise(_0x237fbb,_0x987215,_0x1dacc9){return new BPromise(function(_0x41d2e1,_0x4eeae7){return client[_0xce42('0x13')](_0x237fbb,_0x1dacc9)['then'](function(_0x20395b){logger['info'](_0xce42('0x14'),_0x987215,_0xce42('0x15'));logger['debug'](_0xce42('0x16'),_0x987215,_0xce42('0x15'),JSON['stringify'](_0x20395b));if(_0x20395b[_0xce42('0x17')]){if(_0x20395b[_0xce42('0x17')][_0xce42('0x18')]===0x1f4){logger[_0xce42('0x17')](_0xce42('0x14'),_0x987215,_0x20395b['error'][_0xce42('0x19')]);return _0x4eeae7(_0x20395b[_0xce42('0x17')]['message']);}logger['error']('MailMessage,\x20%s,\x20%s',_0x987215,_0x20395b[_0xce42('0x17')]['message']);return _0x41d2e1(_0x20395b[_0xce42('0x17')][_0xce42('0x19')]);}else{logger['info'](_0xce42('0x14'),_0x987215,_0xce42('0x15'));_0x41d2e1(_0x20395b[_0xce42('0x1a')][_0xce42('0x19')]);}})[_0xce42('0x1b')](function(_0x211c6e){logger[_0xce42('0x17')](_0xce42('0x14'),_0x987215,_0x211c6e);_0x4eeae7(_0x211c6e);});});}exports[_0xce42('0x1c')]=function(_0x1c3815){var _0x2184c5=this;return new Promise(function(_0x33be88,_0xecf25c){return db['MailMessage']['create'](_0x1c3815[_0xce42('0x1d')],{'raw':_0x1c3815[_0xce42('0x1e')]?_0x1c3815[_0xce42('0x1e')][_0xce42('0x1f')]===undefined?!![]:![]:!![]})[_0xce42('0x20')](function(_0x24253f){logger[_0xce42('0x21')](_0xce42('0x1c'),_0x1c3815);logger[_0xce42('0x22')](_0xce42('0x1c'),_0x1c3815,JSON[_0xce42('0x23')](_0x24253f));_0x33be88(_0x24253f);})['catch'](function(_0x1a6be6){logger[_0xce42('0x17')](_0xce42('0x1c'),_0x1a6be6['message'],_0x1c3815);_0xecf25c(_0x2184c5[_0xce42('0x17')](0x1f4,_0x1a6be6[_0xce42('0x19')]));});});};
\ No newline at end of file
+var _0xab29=['body','options','raw','then','CreateMailMessage','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','./mailMessage.socket','register','request','info','debug','MailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','MailMessage,\x20%s,\x20%s','message','catch','MailMessage','create'];(function(_0x3a90b6,_0x782086){var _0x56f71a=function(_0x14ff5e){while(--_0x14ff5e){_0x3a90b6['push'](_0x3a90b6['shift']());}};_0x56f71a(++_0x782086);}(_0xab29,0x145));var _0x9ab2=function(_0x3f2d66,_0x41edfd){_0x3f2d66=_0x3f2d66-0x0;var _0x52f794=_0xab29[_0x3f2d66];return _0x52f794;};'use strict';var _=require(_0x9ab2('0x0'));var util=require(_0x9ab2('0x1'));var moment=require(_0x9ab2('0x2'));var BPromise=require(_0x9ab2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9ab2('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x9ab2('0x5'));var logger=require(_0x9ab2('0x6'))(_0x9ab2('0x7'));var config=require(_0x9ab2('0x8'));var jayson=require(_0x9ab2('0x9'));var client=jayson['client'][_0x9ab2('0xa')]({'port':0x232a});config[_0x9ab2('0xb')]=_[_0x9ab2('0xc')](config[_0x9ab2('0xb')],{'host':_0x9ab2('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9ab2('0xb')]));require(_0x9ab2('0xe'))[_0x9ab2('0xf')](socket);function respondWithRpcPromise(_0x976de,_0x3ef35c,_0x3e0438){return new BPromise(function(_0x477074,_0xb229a2){return client[_0x9ab2('0x10')](_0x976de,_0x3e0438)['then'](function(_0x44522e){logger[_0x9ab2('0x11')]('MailMessage,\x20%s,\x20%s',_0x3ef35c,'request\x20sent');logger[_0x9ab2('0x12')](_0x9ab2('0x13'),_0x3ef35c,_0x9ab2('0x14'),JSON['stringify'](_0x44522e));if(_0x44522e[_0x9ab2('0x15')]){if(_0x44522e[_0x9ab2('0x15')]['code']===0x1f4){logger[_0x9ab2('0x15')](_0x9ab2('0x16'),_0x3ef35c,_0x44522e[_0x9ab2('0x15')][_0x9ab2('0x17')]);return _0xb229a2(_0x44522e[_0x9ab2('0x15')][_0x9ab2('0x17')]);}logger[_0x9ab2('0x15')](_0x9ab2('0x16'),_0x3ef35c,_0x44522e['error'][_0x9ab2('0x17')]);return _0x477074(_0x44522e[_0x9ab2('0x15')][_0x9ab2('0x17')]);}else{logger[_0x9ab2('0x11')](_0x9ab2('0x16'),_0x3ef35c,_0x9ab2('0x14'));_0x477074(_0x44522e['result']['message']);}})[_0x9ab2('0x18')](function(_0x5bc2ed){logger[_0x9ab2('0x15')](_0x9ab2('0x16'),_0x3ef35c,_0x5bc2ed);_0xb229a2(_0x5bc2ed);});});}exports['CreateMailMessage']=function(_0x240517){var _0x1261cd=this;return new Promise(function(_0x55893e,_0x1226e4){return db[_0x9ab2('0x19')][_0x9ab2('0x1a')](_0x240517[_0x9ab2('0x1b')],{'raw':_0x240517[_0x9ab2('0x1c')]?_0x240517[_0x9ab2('0x1c')][_0x9ab2('0x1d')]===undefined?!![]:![]:!![]})[_0x9ab2('0x1e')](function(_0x1fa05b){logger[_0x9ab2('0x11')](_0x9ab2('0x1f'),_0x240517);logger[_0x9ab2('0x12')](_0x9ab2('0x1f'),_0x240517,JSON['stringify'](_0x1fa05b));_0x55893e(_0x1fa05b);})[_0x9ab2('0x18')](function(_0x185d6a){logger[_0x9ab2('0x15')]('CreateMailMessage',_0x185d6a[_0x9ab2('0x17')],_0x240517);_0x1226e4(_0x1261cd[_0x9ab2('0x15')](0x1f4,_0x185d6a[_0x9ab2('0x17')]));});});};
\ No newline at end of file