Built motion from commit (unavailable).|2.0.71
[motion2.git] / server / api / jscriptyProject / jscriptyProject.rpc.js
index 0a9531b..cd55c00 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3634=['../../config/utils','../../config/logger','http','then','info','JscriptyProject,\x20%s,\x20%s','request\x20sent','JscriptyProject,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment'];(function(_0x48d707,_0x30b4f9){var _0x327375=function(_0x4fa172){while(--_0x4fa172){_0x48d707['push'](_0x48d707['shift']());}};_0x327375(++_0x30b4f9);}(_0x3634,0x8e));var _0x4363=function(_0x467b70,_0x44a81b){_0x467b70=_0x467b70-0x0;var _0x2f3080=_0x3634[_0x467b70];return _0x2f3080;};'use strict';var _=require(_0x4363('0x0'));var util=require('util');var moment=require(_0x4363('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var db=require('../../mysqldb')['db'];var utils=require(_0x4363('0x2'));var logger=require(_0x4363('0x3'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x4363('0x4')]({'port':0x232a});function respondWithRpcPromise(_0x35288c,_0x3b07d2,_0x20983a){return new BPromise(function(_0x48f005,_0x2e1e4a){return client['request'](_0x35288c,_0x20983a)[_0x4363('0x5')](function(_0x3aec63){logger[_0x4363('0x6')](_0x4363('0x7'),_0x3b07d2,_0x4363('0x8'));logger['debug'](_0x4363('0x9'),_0x3b07d2,'request\x20sent',JSON[_0x4363('0xa')](_0x3aec63));if(_0x3aec63[_0x4363('0xb')]){if(_0x3aec63[_0x4363('0xb')][_0x4363('0xc')]===0x1f4){logger[_0x4363('0xb')](_0x4363('0x7'),_0x3b07d2,_0x3aec63['error']['message']);return _0x2e1e4a(_0x3aec63[_0x4363('0xb')][_0x4363('0xd')]);}logger[_0x4363('0xb')]('JscriptyProject,\x20%s,\x20%s',_0x3b07d2,_0x3aec63[_0x4363('0xb')]['message']);return _0x48f005(_0x3aec63['error'][_0x4363('0xd')]);}else{logger[_0x4363('0x6')](_0x4363('0x7'),_0x3b07d2,_0x4363('0x8'));_0x48f005(_0x3aec63[_0x4363('0xe')][_0x4363('0xd')]);}})[_0x4363('0xf')](function(_0x255fe7){logger['error']('JscriptyProject,\x20%s,\x20%s',_0x3b07d2,_0x255fe7);_0x2e1e4a(_0x255fe7);});});}
\ No newline at end of file
+var _0x3a28=['then','info','JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','error','message','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x5f1d5a,_0x1c85a7){var _0x449071=function(_0x50549c){while(--_0x50549c){_0x5f1d5a['push'](_0x5f1d5a['shift']());}};_0x449071(++_0x1c85a7);}(_0x3a28,0xec));var _0x83a2=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0x3a28[_0x2064e5];return _0x21a233;};'use strict';var _=require(_0x83a2('0x0'));var util=require('util');var moment=require(_0x83a2('0x1'));var BPromise=require(_0x83a2('0x2'));var rs=require(_0x83a2('0x3'));var fs=require('fs');var db=require(_0x83a2('0x4'))['db'];var utils=require(_0x83a2('0x5'));var logger=require(_0x83a2('0x6'))(_0x83a2('0x7'));var config=require(_0x83a2('0x8'));var jayson=require(_0x83a2('0x9'));var client=jayson[_0x83a2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x334d7a,_0x5bf107,_0x254c32){return new BPromise(function(_0x3c2724,_0x472e11){return client['request'](_0x334d7a,_0x254c32)[_0x83a2('0xb')](function(_0x5eb726){logger[_0x83a2('0xc')](_0x83a2('0xd'),_0x5bf107,_0x83a2('0xe'));logger[_0x83a2('0xf')](_0x83a2('0x10'),_0x5bf107,_0x83a2('0xe'),JSON['stringify'](_0x5eb726));if(_0x5eb726['error']){if(_0x5eb726[_0x83a2('0x11')]['code']===0x1f4){logger[_0x83a2('0x11')]('JscriptyProject,\x20%s,\x20%s',_0x5bf107,_0x5eb726[_0x83a2('0x11')]['message']);return _0x472e11(_0x5eb726['error'][_0x83a2('0x12')]);}logger[_0x83a2('0x11')](_0x83a2('0xd'),_0x5bf107,_0x5eb726[_0x83a2('0x11')]['message']);return _0x3c2724(_0x5eb726[_0x83a2('0x11')][_0x83a2('0x12')]);}else{logger[_0x83a2('0xc')](_0x83a2('0xd'),_0x5bf107,_0x83a2('0xe'));_0x3c2724(_0x5eb726['result'][_0x83a2('0x12')]);}})['catch'](function(_0x1ed0e8){logger[_0x83a2('0x11')](_0x83a2('0xd'),_0x5bf107,_0x1ed0e8);_0x472e11(_0x1ed0e8);});});}
\ No newline at end of file