Built motion from commit 06eb8eb0.|2.6.31
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index dfaa261..280be45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e15=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','MailApplication,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','MailApplication','body','options','raw','where','attributes','limit','UpdateMailApplication','stringify','catch','lodash','util','bluebird','ioredis'];(function(_0x592cd8,_0x515308){var _0x46959d=function(_0x584132){while(--_0x584132){_0x592cd8['push'](_0x592cd8['shift']());}};_0x46959d(++_0x515308);}(_0x6e15,0xf8));var _0x56e1=function(_0x297a9a,_0x3f317b){_0x297a9a=_0x297a9a-0x0;var _0x20e58e=_0x6e15[_0x297a9a];return _0x20e58e;};'use strict';var _=require(_0x56e1('0x0'));var util=require(_0x56e1('0x1'));var moment=require('moment');var BPromise=require(_0x56e1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x56e1('0x3'));var db=require(_0x56e1('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x56e1('0x5'))(_0x56e1('0x6'));var config=require(_0x56e1('0x7'));var jayson=require(_0x56e1('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5398e4,_0xfdd1ee,_0x1a5443){return new BPromise(function(_0x547965,_0x2f9afa){return client['request'](_0x5398e4,_0x1a5443)[_0x56e1('0x9')](function(_0x4244a9){logger[_0x56e1('0xa')](_0x56e1('0xb'),_0xfdd1ee,'request\x20sent');logger[_0x56e1('0xc')]('MailApplication,\x20%s,\x20%s,\x20%s',_0xfdd1ee,_0x56e1('0xd'),JSON['stringify'](_0x4244a9));if(_0x4244a9[_0x56e1('0xe')]){if(_0x4244a9[_0x56e1('0xe')][_0x56e1('0xf')]===0x1f4){logger['error'](_0x56e1('0xb'),_0xfdd1ee,_0x4244a9[_0x56e1('0xe')]['message']);return _0x2f9afa(_0x4244a9[_0x56e1('0xe')][_0x56e1('0x10')]);}logger[_0x56e1('0xe')](_0x56e1('0xb'),_0xfdd1ee,_0x4244a9[_0x56e1('0xe')][_0x56e1('0x10')]);return _0x547965(_0x4244a9[_0x56e1('0xe')]['message']);}else{logger[_0x56e1('0xa')]('MailApplication,\x20%s,\x20%s',_0xfdd1ee,'request\x20sent');_0x547965(_0x4244a9[_0x56e1('0x11')][_0x56e1('0x10')]);}})['catch'](function(_0x1a8c8f){logger['error']('MailApplication,\x20%s,\x20%s',_0xfdd1ee,_0x1a8c8f);_0x2f9afa(_0x1a8c8f);});});}exports['UpdateMailApplication']=function(_0x52dc76){var _0x423509=this;return new Promise(function(_0x2307d7,_0x3f8543){return db[_0x56e1('0x12')]['update'](_0x52dc76[_0x56e1('0x13')],{'raw':_0x52dc76[_0x56e1('0x14')]?_0x52dc76[_0x56e1('0x14')][_0x56e1('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x52dc76[_0x56e1('0x14')]?_0x52dc76[_0x56e1('0x14')][_0x56e1('0x16')]||null:null,'attributes':_0x52dc76[_0x56e1('0x14')]?_0x52dc76[_0x56e1('0x14')][_0x56e1('0x17')]||null:null,'limit':_0x52dc76[_0x56e1('0x14')]?_0x52dc76[_0x56e1('0x14')][_0x56e1('0x18')]||null:null})['then'](function(_0x2117e3){logger[_0x56e1('0xa')](_0x56e1('0x19'),_0x52dc76);logger[_0x56e1('0xc')](_0x56e1('0x19'),_0x52dc76,JSON[_0x56e1('0x1a')](_0x2117e3));_0x2307d7(_0x2117e3);})[_0x56e1('0x1b')](function(_0x44ba40){logger['error'](_0x56e1('0x19'),_0x44ba40[_0x56e1('0x10')],_0x52dc76);_0x3f8543(_0x423509[_0x56e1('0xe')](0x1f4,_0x44ba40['message']));});});};
\ No newline at end of file
+var _0x58b9=['raw','attributes','limit','info','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','MailApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','MailApplication,\x20%s,\x20%s','message','catch','UpdateMailApplication','MailApplication','update','options'];(function(_0x5e072d,_0x505cfc){var _0x3bbfb4=function(_0x1c1fe5){while(--_0x1c1fe5){_0x5e072d['push'](_0x5e072d['shift']());}};_0x3bbfb4(++_0x505cfc);}(_0x58b9,0x18a));var _0x958b=function(_0xb1125a,_0x4b5ecd){_0xb1125a=_0xb1125a-0x0;var _0x11a717=_0x58b9[_0xb1125a];return _0x11a717;};'use strict';var _=require(_0x958b('0x0'));var util=require(_0x958b('0x1'));var moment=require(_0x958b('0x2'));var BPromise=require(_0x958b('0x3'));var rs=require(_0x958b('0x4'));var fs=require('fs');var Redis=require(_0x958b('0x5'));var db=require(_0x958b('0x6'))['db'];var utils=require(_0x958b('0x7'));var logger=require(_0x958b('0x8'))(_0x958b('0x9'));var config=require(_0x958b('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x958b('0xb')][_0x958b('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x48c28c,_0x2f5b5e,_0x4a912a){return new BPromise(function(_0x194e36,_0x15d09f){return client['request'](_0x48c28c,_0x4a912a)[_0x958b('0xd')](function(_0x4c76df){logger['info']('MailApplication,\x20%s,\x20%s',_0x2f5b5e,'request\x20sent');logger['debug'](_0x958b('0xe'),_0x2f5b5e,_0x958b('0xf'),JSON[_0x958b('0x10')](_0x4c76df));if(_0x4c76df['error']){if(_0x4c76df[_0x958b('0x11')][_0x958b('0x12')]===0x1f4){logger[_0x958b('0x11')](_0x958b('0x13'),_0x2f5b5e,_0x4c76df[_0x958b('0x11')][_0x958b('0x14')]);return _0x15d09f(_0x4c76df[_0x958b('0x11')][_0x958b('0x14')]);}logger[_0x958b('0x11')](_0x958b('0x13'),_0x2f5b5e,_0x4c76df[_0x958b('0x11')][_0x958b('0x14')]);return _0x194e36(_0x4c76df[_0x958b('0x11')][_0x958b('0x14')]);}else{logger['info'](_0x958b('0x13'),_0x2f5b5e,'request\x20sent');_0x194e36(_0x4c76df['result']['message']);}})[_0x958b('0x15')](function(_0x2a0c25){logger[_0x958b('0x11')](_0x958b('0x13'),_0x2f5b5e,_0x2a0c25);_0x15d09f(_0x2a0c25);});});}exports[_0x958b('0x16')]=function(_0xe06d39){var _0x21a661=this;return new Promise(function(_0x4274c4,_0x31a7e9){return db[_0x958b('0x17')][_0x958b('0x18')](_0xe06d39['body'],{'raw':_0xe06d39[_0x958b('0x19')]?_0xe06d39[_0x958b('0x19')][_0x958b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xe06d39[_0x958b('0x19')]?_0xe06d39[_0x958b('0x19')]['where']||null:null,'attributes':_0xe06d39[_0x958b('0x19')]?_0xe06d39['options'][_0x958b('0x1b')]||null:null,'limit':_0xe06d39[_0x958b('0x19')]?_0xe06d39[_0x958b('0x19')][_0x958b('0x1c')]||null:null})[_0x958b('0xd')](function(_0x7a24a9){logger[_0x958b('0x1d')](_0x958b('0x16'),_0xe06d39);logger['debug'](_0x958b('0x16'),_0xe06d39,JSON[_0x958b('0x10')](_0x7a24a9));_0x4274c4(_0x7a24a9);})['catch'](function(_0x280b68){logger[_0x958b('0x11')](_0x958b('0x16'),_0x280b68[_0x958b('0x14')],_0xe06d39);_0x31a7e9(_0x21a661[_0x958b('0x11')](0x1f4,_0x280b68[_0x958b('0x14')]));});});};
\ No newline at end of file