Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / attachment / attachment.rpc.js
index b600bad..b157c34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b5d=['stringify','catch','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','error','message','result','CreateAttachment','Attachment','body','options'];(function(_0x5d5011,_0x23f8f4){var _0x23c817=function(_0x15cb26){while(--_0x15cb26){_0x5d5011['push'](_0x5d5011['shift']());}};_0x23c817(++_0x23f8f4);}(_0x3b5d,0x10a));var _0xd3b5=function(_0x288536,_0x369b51){_0x288536=_0x288536-0x0;var _0x525e94=_0x3b5d[_0x288536];return _0x525e94;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xd3b5('0x0'));var BPromise=require(_0xd3b5('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xd3b5('0x2'));var logger=require(_0xd3b5('0x3'))(_0xd3b5('0x4'));var config=require(_0xd3b5('0x5'));var jayson=require(_0xd3b5('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x54beb3,_0xb9c317,_0x2c7cc9){return new BPromise(function(_0x277cc0,_0x528b12){return client['request'](_0x54beb3,_0x2c7cc9)[_0xd3b5('0x7')](function(_0x21afc3){logger[_0xd3b5('0x8')](_0xd3b5('0x9'),_0xb9c317,_0xd3b5('0xa'));logger[_0xd3b5('0xb')](_0xd3b5('0xc'),_0xb9c317,'request\x20sent',JSON['stringify'](_0x21afc3));if(_0x21afc3[_0xd3b5('0xd')]){if(_0x21afc3[_0xd3b5('0xd')]['code']===0x1f4){logger[_0xd3b5('0xd')]('Attachment,\x20%s,\x20%s',_0xb9c317,_0x21afc3[_0xd3b5('0xd')][_0xd3b5('0xe')]);return _0x528b12(_0x21afc3[_0xd3b5('0xd')][_0xd3b5('0xe')]);}logger[_0xd3b5('0xd')](_0xd3b5('0x9'),_0xb9c317,_0x21afc3[_0xd3b5('0xd')][_0xd3b5('0xe')]);return _0x277cc0(_0x21afc3[_0xd3b5('0xd')][_0xd3b5('0xe')]);}else{logger[_0xd3b5('0x8')](_0xd3b5('0x9'),_0xb9c317,_0xd3b5('0xa'));_0x277cc0(_0x21afc3[_0xd3b5('0xf')][_0xd3b5('0xe')]);}})['catch'](function(_0xbc98c0){logger[_0xd3b5('0xd')](_0xd3b5('0x9'),_0xb9c317,_0xbc98c0);_0x528b12(_0xbc98c0);});});}exports[_0xd3b5('0x10')]=function(_0x11670e){var _0x5e7e58=this;return new Promise(function(_0x1cfd06,_0x1ce905){return db[_0xd3b5('0x11')]['create'](_0x11670e[_0xd3b5('0x12')],{'raw':_0x11670e[_0xd3b5('0x13')]?_0x11670e[_0xd3b5('0x13')]['raw']===undefined?!![]:![]:!![]})[_0xd3b5('0x7')](function(_0x532d11){logger[_0xd3b5('0x8')](_0xd3b5('0x10'),_0x11670e);logger['debug'](_0xd3b5('0x10'),_0x11670e,JSON[_0xd3b5('0x14')](_0x532d11));_0x1cfd06(_0x532d11);})[_0xd3b5('0x15')](function(_0xa5700e){logger[_0xd3b5('0xd')](_0xd3b5('0x10'),_0xa5700e[_0xd3b5('0xe')],_0x11670e);_0x1ce905(_0x5e7e58[_0xd3b5('0xd')](0x1f4,_0xa5700e[_0xd3b5('0xe')]));});});};
\ No newline at end of file
+var _0x6416=['Attachment,\x20%s,\x20%s,\x20%s','error','message','result','CreateAttachment','Attachment','create','options','raw','then','stringify','moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','client','http','request','Attachment,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x339a74,_0x3f32ee){var _0x9e4a0e=function(_0xe4ddcd){while(--_0xe4ddcd){_0x339a74['push'](_0x339a74['shift']());}};_0x9e4a0e(++_0x3f32ee);}(_0x6416,0x1ee));var _0x6641=function(_0x1aaf46,_0x362b5d){_0x1aaf46=_0x1aaf46-0x0;var _0x3c87b9=_0x6416[_0x1aaf46];return _0x3c87b9;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6641('0x0'));var BPromise=require(_0x6641('0x1'));var rs=require(_0x6641('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6641('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x6641('0x4'));var config=require(_0x6641('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x6641('0x6')][_0x6641('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2cb8a2,_0x3a50aa,_0x2ed7af){return new BPromise(function(_0x172fb8,_0x2dcf60){return client[_0x6641('0x8')](_0x2cb8a2,_0x2ed7af)['then'](function(_0x58f37f){logger['info'](_0x6641('0x9'),_0x3a50aa,_0x6641('0xa'));logger[_0x6641('0xb')](_0x6641('0xc'),_0x3a50aa,_0x6641('0xa'),JSON['stringify'](_0x58f37f));if(_0x58f37f[_0x6641('0xd')]){if(_0x58f37f[_0x6641('0xd')]['code']===0x1f4){logger[_0x6641('0xd')]('Attachment,\x20%s,\x20%s',_0x3a50aa,_0x58f37f[_0x6641('0xd')][_0x6641('0xe')]);return _0x2dcf60(_0x58f37f[_0x6641('0xd')][_0x6641('0xe')]);}logger[_0x6641('0xd')](_0x6641('0x9'),_0x3a50aa,_0x58f37f[_0x6641('0xd')][_0x6641('0xe')]);return _0x172fb8(_0x58f37f[_0x6641('0xd')][_0x6641('0xe')]);}else{logger['info'](_0x6641('0x9'),_0x3a50aa,'request\x20sent');_0x172fb8(_0x58f37f[_0x6641('0xf')][_0x6641('0xe')]);}})['catch'](function(_0x5c2f48){logger[_0x6641('0xd')](_0x6641('0x9'),_0x3a50aa,_0x5c2f48);_0x2dcf60(_0x5c2f48);});});}exports[_0x6641('0x10')]=function(_0x1eba45){var _0x202523=this;return new Promise(function(_0x41a163,_0xd3a41e){return db[_0x6641('0x11')][_0x6641('0x12')](_0x1eba45['body'],{'raw':_0x1eba45[_0x6641('0x13')]?_0x1eba45[_0x6641('0x13')][_0x6641('0x14')]===undefined?!![]:![]:!![]})[_0x6641('0x15')](function(_0xf59d0e){logger['info']('CreateAttachment',_0x1eba45);logger['debug'](_0x6641('0x10'),_0x1eba45,JSON[_0x6641('0x16')](_0xf59d0e));_0x41a163(_0xf59d0e);})['catch'](function(_0x224735){logger['error'](_0x6641('0x10'),_0x224735[_0x6641('0xe')],_0x1eba45);_0xd3a41e(_0x202523['error'](0x1f4,_0x224735[_0x6641('0xe')]));});});};
\ No newline at end of file