Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index 1545d32..829a4bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f67=['lodash','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','MailApplication,\x20%s,\x20%s,\x20%s','error','code','message','MailApplication,\x20%s,\x20%s','result','MailApplication','body','options','raw','where','attributes','limit','UpdateMailApplication','debug','catch'];(function(_0x5f4fc0,_0x30de12){var _0x1fe751=function(_0x597580){while(--_0x597580){_0x5f4fc0['push'](_0x5f4fc0['shift']());}};_0x1fe751(++_0x30de12);}(_0x6f67,0xf0));var _0x76f6=function(_0x595682,_0x23fd00){_0x595682=_0x595682-0x0;var _0x2eceac=_0x6f67[_0x595682];return _0x2eceac;};'use strict';var _=require(_0x76f6('0x0'));var util=require(_0x76f6('0x1'));var moment=require(_0x76f6('0x2'));var BPromise=require('bluebird');var rs=require(_0x76f6('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x76f6('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x76f6('0x5'))(_0x76f6('0x6'));var config=require(_0x76f6('0x7'));var jayson=require(_0x76f6('0x8'));var client=jayson['client'][_0x76f6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x352550,_0x2b74d8,_0x2c8884){return new BPromise(function(_0x20e27d,_0x4adf60){return client[_0x76f6('0xa')](_0x352550,_0x2c8884)[_0x76f6('0xb')](function(_0x3b6b96){logger[_0x76f6('0xc')]('MailApplication,\x20%s,\x20%s',_0x2b74d8,_0x76f6('0xd'));logger['debug'](_0x76f6('0xe'),_0x2b74d8,'request\x20sent',JSON['stringify'](_0x3b6b96));if(_0x3b6b96[_0x76f6('0xf')]){if(_0x3b6b96[_0x76f6('0xf')][_0x76f6('0x10')]===0x1f4){logger[_0x76f6('0xf')]('MailApplication,\x20%s,\x20%s',_0x2b74d8,_0x3b6b96[_0x76f6('0xf')][_0x76f6('0x11')]);return _0x4adf60(_0x3b6b96['error'][_0x76f6('0x11')]);}logger[_0x76f6('0xf')](_0x76f6('0x12'),_0x2b74d8,_0x3b6b96[_0x76f6('0xf')]['message']);return _0x20e27d(_0x3b6b96[_0x76f6('0xf')][_0x76f6('0x11')]);}else{logger[_0x76f6('0xc')](_0x76f6('0x12'),_0x2b74d8,_0x76f6('0xd'));_0x20e27d(_0x3b6b96[_0x76f6('0x13')][_0x76f6('0x11')]);}})['catch'](function(_0x442a85){logger[_0x76f6('0xf')](_0x76f6('0x12'),_0x2b74d8,_0x442a85);_0x4adf60(_0x442a85);});});}exports['UpdateMailApplication']=function(_0x2ed64c){var _0x2af9af=this;return new Promise(function(_0x414d66,_0x1c6730){return db[_0x76f6('0x14')]['update'](_0x2ed64c[_0x76f6('0x15')],{'raw':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x18')]||null:null,'attributes':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x19')]||null:null,'limit':_0x2ed64c[_0x76f6('0x16')]?_0x2ed64c[_0x76f6('0x16')][_0x76f6('0x1a')]||null:null})[_0x76f6('0xb')](function(_0x4e8f13){logger['info'](_0x76f6('0x1b'),_0x2ed64c);logger[_0x76f6('0x1c')](_0x76f6('0x1b'),_0x2ed64c,JSON['stringify'](_0x4e8f13));_0x414d66(_0x4e8f13);})[_0x76f6('0x1d')](function(_0xc98d1){logger[_0x76f6('0xf')](_0x76f6('0x1b'),_0xc98d1[_0x76f6('0x11')],_0x2ed64c);_0x1c6730(_0x2af9af['error'](0x1f4,_0xc98d1[_0x76f6('0x11')]));});});};
\ No newline at end of file
+var _0x94b4=['../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','code','message','MailApplication,\x20%s,\x20%s','catch','UpdateMailApplication','update','body','options','raw','attributes','then','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x2a4095,_0x13f4f0){var _0x52eeab=function(_0x3950dd){while(--_0x3950dd){_0x2a4095['push'](_0x2a4095['shift']());}};_0x52eeab(++_0x13f4f0);}(_0x94b4,0xf5));var _0x494b=function(_0x54577d,_0x4ec759){_0x54577d=_0x54577d-0x0;var _0x43da03=_0x94b4[_0x54577d];return _0x43da03;};'use strict';var _=require(_0x494b('0x0'));var util=require(_0x494b('0x1'));var moment=require(_0x494b('0x2'));var BPromise=require('bluebird');var rs=require(_0x494b('0x3'));var fs=require('fs');var Redis=require(_0x494b('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x494b('0x5'));var logger=require(_0x494b('0x6'))('rpc');var config=require(_0x494b('0x7'));var jayson=require(_0x494b('0x8'));var client=jayson[_0x494b('0x9')][_0x494b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x9f8a56,_0x53dca2,_0x4761d6){return new BPromise(function(_0x1b9a0d,_0x169f0b){return client[_0x494b('0xb')](_0x9f8a56,_0x4761d6)['then'](function(_0x3f5995){logger[_0x494b('0xc')]('MailApplication,\x20%s,\x20%s',_0x53dca2,_0x494b('0xd'));logger[_0x494b('0xe')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x53dca2,_0x494b('0xd'),JSON[_0x494b('0xf')](_0x3f5995));if(_0x3f5995[_0x494b('0x10')]){if(_0x3f5995[_0x494b('0x10')][_0x494b('0x11')]===0x1f4){logger[_0x494b('0x10')]('MailApplication,\x20%s,\x20%s',_0x53dca2,_0x3f5995[_0x494b('0x10')]['message']);return _0x169f0b(_0x3f5995[_0x494b('0x10')][_0x494b('0x12')]);}logger[_0x494b('0x10')]('MailApplication,\x20%s,\x20%s',_0x53dca2,_0x3f5995[_0x494b('0x10')][_0x494b('0x12')]);return _0x1b9a0d(_0x3f5995[_0x494b('0x10')][_0x494b('0x12')]);}else{logger[_0x494b('0xc')](_0x494b('0x13'),_0x53dca2,_0x494b('0xd'));_0x1b9a0d(_0x3f5995['result']['message']);}})[_0x494b('0x14')](function(_0x586571){logger['error'](_0x494b('0x13'),_0x53dca2,_0x586571);_0x169f0b(_0x586571);});});}exports[_0x494b('0x15')]=function(_0x10cd1d){var _0x2e04c8=this;return new Promise(function(_0x1df638,_0x5bf462){return db['MailApplication'][_0x494b('0x16')](_0x10cd1d[_0x494b('0x17')],{'raw':_0x10cd1d[_0x494b('0x18')]?_0x10cd1d['options'][_0x494b('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x10cd1d['options']?_0x10cd1d[_0x494b('0x18')]['where']||null:null,'attributes':_0x10cd1d['options']?_0x10cd1d[_0x494b('0x18')][_0x494b('0x1a')]||null:null,'limit':_0x10cd1d[_0x494b('0x18')]?_0x10cd1d[_0x494b('0x18')]['limit']||null:null})[_0x494b('0x1b')](function(_0x133c3d){logger['info'](_0x494b('0x15'),_0x10cd1d);logger[_0x494b('0xe')](_0x494b('0x15'),_0x10cd1d,JSON[_0x494b('0xf')](_0x133c3d));_0x1df638(_0x133c3d);})[_0x494b('0x14')](function(_0x3c339f){logger[_0x494b('0x10')](_0x494b('0x15'),_0x3c339f[_0x494b('0x12')],_0x10cd1d);_0x5bf462(_0x2e04c8[_0x494b('0x10')](0x1f4,_0x3c339f['message']));});});};
\ No newline at end of file