Built motion from commit 092f8824.|2.5.49
[motion2.git] / server / api / mailApplication / mailApplication.rpc.js
index cabdfb4..81795d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x204f=['attributes','limit','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','info','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','MailApplication,\x20%s,\x20%s','message','result','catch','UpdateMailApplication','MailApplication','update','options'];(function(_0x1e1b12,_0x4ce9f5){var _0x118f5d=function(_0x2000aa){while(--_0x2000aa){_0x1e1b12['push'](_0x1e1b12['shift']());}};_0x118f5d(++_0x4ce9f5);}(_0x204f,0x15e));var _0xf204=function(_0x367584,_0x57e019){_0x367584=_0x367584-0x0;var _0xf1652f=_0x204f[_0x367584];return _0xf1652f;};'use strict';var _=require(_0xf204('0x0'));var util=require(_0xf204('0x1'));var moment=require(_0xf204('0x2'));var BPromise=require(_0xf204('0x3'));var rs=require(_0xf204('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf204('0x5'))['db'];var utils=require(_0xf204('0x6'));var logger=require(_0xf204('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xf204('0x8')][_0xf204('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3d9e05,_0xa5b976,_0x382bcd){return new BPromise(function(_0x38a1aa,_0x2d4786){return client[_0xf204('0xa')](_0x3d9e05,_0x382bcd)[_0xf204('0xb')](function(_0xf9a346){logger[_0xf204('0xc')]('MailApplication,\x20%s,\x20%s',_0xa5b976,_0xf204('0xd'));logger[_0xf204('0xe')](_0xf204('0xf'),_0xa5b976,_0xf204('0xd'),JSON[_0xf204('0x10')](_0xf9a346));if(_0xf9a346[_0xf204('0x11')]){if(_0xf9a346[_0xf204('0x11')][_0xf204('0x12')]===0x1f4){logger[_0xf204('0x11')](_0xf204('0x13'),_0xa5b976,_0xf9a346[_0xf204('0x11')][_0xf204('0x14')]);return _0x2d4786(_0xf9a346['error'][_0xf204('0x14')]);}logger[_0xf204('0x11')](_0xf204('0x13'),_0xa5b976,_0xf9a346[_0xf204('0x11')][_0xf204('0x14')]);return _0x38a1aa(_0xf9a346[_0xf204('0x11')][_0xf204('0x14')]);}else{logger[_0xf204('0xc')](_0xf204('0x13'),_0xa5b976,'request\x20sent');_0x38a1aa(_0xf9a346[_0xf204('0x15')][_0xf204('0x14')]);}})[_0xf204('0x16')](function(_0x2b6001){logger[_0xf204('0x11')](_0xf204('0x13'),_0xa5b976,_0x2b6001);_0x2d4786(_0x2b6001);});});}exports[_0xf204('0x17')]=function(_0x4d85c8){var _0x1672c3=this;return new Promise(function(_0x41f38f,_0x49e7ce){return db[_0xf204('0x18')][_0xf204('0x19')](_0x4d85c8['body'],{'raw':_0x4d85c8[_0xf204('0x1a')]?_0x4d85c8['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4d85c8[_0xf204('0x1a')]?_0x4d85c8[_0xf204('0x1a')]['where']||null:null,'attributes':_0x4d85c8['options']?_0x4d85c8[_0xf204('0x1a')][_0xf204('0x1b')]||null:null,'limit':_0x4d85c8[_0xf204('0x1a')]?_0x4d85c8[_0xf204('0x1a')][_0xf204('0x1c')]||null:null})[_0xf204('0xb')](function(_0x43ac30){logger['info'](_0xf204('0x17'),_0x4d85c8);logger['debug'](_0xf204('0x17'),_0x4d85c8,JSON[_0xf204('0x10')](_0x43ac30));_0x41f38f(_0x43ac30);})[_0xf204('0x16')](function(_0x456482){logger[_0xf204('0x11')](_0xf204('0x17'),_0x456482[_0xf204('0x14')],_0x4d85c8);_0x49e7ce(_0x1672c3[_0xf204('0x11')](0x1f4,_0x456482[_0xf204('0x14')]));});});};
\ No newline at end of file
+var _0x679b=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','MailApplication,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','UpdateMailApplication','options','where','attributes','limit','debug','lodash','util','moment','bluebird','randomstring'];(function(_0x12300a,_0x58abea){var _0x707a0f=function(_0x5903c8){while(--_0x5903c8){_0x12300a['push'](_0x12300a['shift']());}};_0x707a0f(++_0x58abea);}(_0x679b,0x19f));var _0xb679=function(_0x2d5cde,_0x9222cb){_0x2d5cde=_0x2d5cde-0x0;var _0x4839ff=_0x679b[_0x2d5cde];return _0x4839ff;};'use strict';var _=require(_0xb679('0x0'));var util=require(_0xb679('0x1'));var moment=require(_0xb679('0x2'));var BPromise=require(_0xb679('0x3'));var rs=require(_0xb679('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb679('0x5'))['db'];var utils=require(_0xb679('0x6'));var logger=require(_0xb679('0x7'))(_0xb679('0x8'));var config=require(_0xb679('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xb679('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x576257,_0x176ef8,_0x388ba5){return new BPromise(function(_0x4679e5,_0x209052){return client[_0xb679('0xb')](_0x576257,_0x388ba5)[_0xb679('0xc')](function(_0x4caf54){logger[_0xb679('0xd')](_0xb679('0xe'),_0x176ef8,_0xb679('0xf'));logger['debug']('MailApplication,\x20%s,\x20%s,\x20%s',_0x176ef8,_0xb679('0xf'),JSON[_0xb679('0x10')](_0x4caf54));if(_0x4caf54[_0xb679('0x11')]){if(_0x4caf54[_0xb679('0x11')][_0xb679('0x12')]===0x1f4){logger['error']('MailApplication,\x20%s,\x20%s',_0x176ef8,_0x4caf54[_0xb679('0x11')][_0xb679('0x13')]);return _0x209052(_0x4caf54[_0xb679('0x11')][_0xb679('0x13')]);}logger[_0xb679('0x11')](_0xb679('0xe'),_0x176ef8,_0x4caf54[_0xb679('0x11')][_0xb679('0x13')]);return _0x4679e5(_0x4caf54[_0xb679('0x11')]['message']);}else{logger[_0xb679('0xd')](_0xb679('0xe'),_0x176ef8,_0xb679('0xf'));_0x4679e5(_0x4caf54[_0xb679('0x14')][_0xb679('0x13')]);}})[_0xb679('0x15')](function(_0x42a87e){logger[_0xb679('0x11')](_0xb679('0xe'),_0x176ef8,_0x42a87e);_0x209052(_0x42a87e);});});}exports[_0xb679('0x16')]=function(_0x3f40a3){var _0x297e26=this;return new Promise(function(_0xdb1e14,_0x583518){return db['MailApplication']['update'](_0x3f40a3['body'],{'raw':_0x3f40a3['options']?_0x3f40a3['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f40a3['options']?_0x3f40a3[_0xb679('0x17')][_0xb679('0x18')]||null:null,'attributes':_0x3f40a3[_0xb679('0x17')]?_0x3f40a3['options'][_0xb679('0x19')]||null:null,'limit':_0x3f40a3[_0xb679('0x17')]?_0x3f40a3[_0xb679('0x17')][_0xb679('0x1a')]||null:null})[_0xb679('0xc')](function(_0x1b6b88){logger[_0xb679('0xd')](_0xb679('0x16'),_0x3f40a3);logger[_0xb679('0x1b')](_0xb679('0x16'),_0x3f40a3,JSON[_0xb679('0x10')](_0x1b6b88));_0xdb1e14(_0x1b6b88);})[_0xb679('0x15')](function(_0x3ebb11){logger[_0xb679('0x11')](_0xb679('0x16'),_0x3ebb11[_0xb679('0x13')],_0x3f40a3);_0x583518(_0x297e26['error'](0x1f4,_0x3ebb11['message']));});});};
\ No newline at end of file