Built motion from commit b5996064.|2.6.21
[motion2.git] / server / api / mailMessage / mailMessage.rpc.js
index 837e707..541dd2b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x84a0=['lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','client','http','redis','defaults','socket.io-emitter','./mailMessage.socket','register','request','then','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','MailMessage,\x20%s,\x20%s','message','info','result','catch','CreateMailMessage','MailMessage','create','body','options','raw'];(function(_0x42a995,_0x595bb7){var _0x8fff1d=function(_0x3a4f6c){while(--_0x3a4f6c){_0x42a995['push'](_0x42a995['shift']());}};_0x8fff1d(++_0x595bb7);}(_0x84a0,0x66));var _0x084a=function(_0x327dc3,_0x3e78d2){_0x327dc3=_0x327dc3-0x0;var _0x599437=_0x84a0[_0x327dc3];return _0x599437;};'use strict';var _=require(_0x084a('0x0'));var util=require(_0x084a('0x1'));var moment=require(_0x084a('0x2'));var BPromise=require(_0x084a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x084a('0x4'));var db=require(_0x084a('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x084a('0x6'));var config=require(_0x084a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x084a('0x8')][_0x084a('0x9')]({'port':0x232a});config[_0x084a('0xa')]=_[_0x084a('0xb')](config[_0x084a('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x084a('0xc'))(new Redis(config[_0x084a('0xa')]));require(_0x084a('0xd'))[_0x084a('0xe')](socket);function respondWithRpcPromise(_0x142127,_0x4c1e29,_0x4dd423){return new BPromise(function(_0x3d9dc6,_0x853df){return client[_0x084a('0xf')](_0x142127,_0x4dd423)[_0x084a('0x10')](function(_0x2d7c90){logger['info']('MailMessage,\x20%s,\x20%s',_0x4c1e29,_0x084a('0x11'));logger[_0x084a('0x12')](_0x084a('0x13'),_0x4c1e29,_0x084a('0x11'),JSON[_0x084a('0x14')](_0x2d7c90));if(_0x2d7c90[_0x084a('0x15')]){if(_0x2d7c90[_0x084a('0x15')][_0x084a('0x16')]===0x1f4){logger['error'](_0x084a('0x17'),_0x4c1e29,_0x2d7c90['error'][_0x084a('0x18')]);return _0x853df(_0x2d7c90[_0x084a('0x15')][_0x084a('0x18')]);}logger[_0x084a('0x15')](_0x084a('0x17'),_0x4c1e29,_0x2d7c90['error'][_0x084a('0x18')]);return _0x3d9dc6(_0x2d7c90['error'][_0x084a('0x18')]);}else{logger[_0x084a('0x19')]('MailMessage,\x20%s,\x20%s',_0x4c1e29,_0x084a('0x11'));_0x3d9dc6(_0x2d7c90[_0x084a('0x1a')][_0x084a('0x18')]);}})[_0x084a('0x1b')](function(_0x33d3a6){logger[_0x084a('0x15')](_0x084a('0x17'),_0x4c1e29,_0x33d3a6);_0x853df(_0x33d3a6);});});}exports[_0x084a('0x1c')]=function(_0x3f60cf){var _0xcb5356=this;return new Promise(function(_0x3c7fd6,_0x279e25){return db[_0x084a('0x1d')][_0x084a('0x1e')](_0x3f60cf[_0x084a('0x1f')],{'raw':_0x3f60cf['options']?_0x3f60cf[_0x084a('0x20')][_0x084a('0x21')]===undefined?!![]:![]:!![]})[_0x084a('0x10')](function(_0x2d62bf){logger[_0x084a('0x19')]('CreateMailMessage',_0x3f60cf);logger[_0x084a('0x12')](_0x084a('0x1c'),_0x3f60cf,JSON[_0x084a('0x14')](_0x2d62bf));_0x3c7fd6(_0x2d62bf);})[_0x084a('0x1b')](function(_0x18b43d){logger[_0x084a('0x15')]('CreateMailMessage',_0x18b43d[_0x084a('0x18')],_0x3f60cf);_0x279e25(_0xcb5356[_0x084a('0x15')](0x1f4,_0x18b43d[_0x084a('0x18')]));});});};
\ No newline at end of file
+var _0xb44a=['then','info','MailMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','CreateMailMessage','MailMessage','body','options','raw','moment','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','register'];(function(_0xd2b4cf,_0x1aaead){var _0x2ec3c1=function(_0x5eaad2){while(--_0x5eaad2){_0xd2b4cf['push'](_0xd2b4cf['shift']());}};_0x2ec3c1(++_0x1aaead);}(_0xb44a,0x1c2));var _0xab44=function(_0x23b1d5,_0x3043fa){_0x23b1d5=_0x23b1d5-0x0;var _0x3f5702=_0xb44a[_0x23b1d5];return _0x3f5702;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xab44('0x0'));var BPromise=require('bluebird');var rs=require(_0xab44('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xab44('0x2'));var logger=require('../../config/logger')(_0xab44('0x3'));var config=require(_0xab44('0x4'));var jayson=require(_0xab44('0x5'));var client=jayson[_0xab44('0x6')][_0xab44('0x7')]({'port':0x232a});config[_0xab44('0x8')]=_[_0xab44('0x9')](config[_0xab44('0x8')],{'host':_0xab44('0xa'),'port':0x18eb});var socket=require(_0xab44('0xb'))(new Redis(config[_0xab44('0x8')]));require(_0xab44('0xc'))[_0xab44('0xd')](socket);function respondWithRpcPromise(_0x55c7d2,_0x2a670e,_0x500a9f){return new BPromise(function(_0x15e64e,_0x5168fa){return client['request'](_0x55c7d2,_0x500a9f)[_0xab44('0xe')](function(_0x6746cc){logger[_0xab44('0xf')](_0xab44('0x10'),_0x2a670e,_0xab44('0x11'));logger[_0xab44('0x12')]('MailMessage,\x20%s,\x20%s,\x20%s',_0x2a670e,'request\x20sent',JSON[_0xab44('0x13')](_0x6746cc));if(_0x6746cc['error']){if(_0x6746cc[_0xab44('0x14')]['code']===0x1f4){logger[_0xab44('0x14')](_0xab44('0x10'),_0x2a670e,_0x6746cc[_0xab44('0x14')][_0xab44('0x15')]);return _0x5168fa(_0x6746cc[_0xab44('0x14')][_0xab44('0x15')]);}logger['error']('MailMessage,\x20%s,\x20%s',_0x2a670e,_0x6746cc[_0xab44('0x14')][_0xab44('0x15')]);return _0x15e64e(_0x6746cc[_0xab44('0x14')][_0xab44('0x15')]);}else{logger[_0xab44('0xf')](_0xab44('0x10'),_0x2a670e,_0xab44('0x11'));_0x15e64e(_0x6746cc[_0xab44('0x16')][_0xab44('0x15')]);}})[_0xab44('0x17')](function(_0x27fc7f){logger['error'](_0xab44('0x10'),_0x2a670e,_0x27fc7f);_0x5168fa(_0x27fc7f);});});}exports[_0xab44('0x18')]=function(_0x101a1b){var _0x2902ca=this;return new Promise(function(_0x29bb73,_0x5123b1){return db[_0xab44('0x19')]['create'](_0x101a1b[_0xab44('0x1a')],{'raw':_0x101a1b[_0xab44('0x1b')]?_0x101a1b[_0xab44('0x1b')][_0xab44('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x3a2b1d){logger[_0xab44('0xf')](_0xab44('0x18'),_0x101a1b);logger[_0xab44('0x12')](_0xab44('0x18'),_0x101a1b,JSON[_0xab44('0x13')](_0x3a2b1d));_0x29bb73(_0x3a2b1d);})[_0xab44('0x17')](function(_0x554955){logger['error'](_0xab44('0x18'),_0x554955['message'],_0x101a1b);_0x5123b1(_0x2902ca[_0xab44('0x14')](0x1f4,_0x554955['message']));});});};
\ No newline at end of file