Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / license / license.rpc.js
index 83cd6a8..9998003 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc07f=['message','info','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','License,\x20%s,\x20%s','debug','License,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0xc07f,0x184));var _0xfc07=function(_0x187466,_0x2041b3){_0x187466=_0x187466-0x0;var _0x118a2e=_0xc07f[_0x187466];return _0x118a2e;};'use strict';var _=require(_0xfc07('0x0'));var util=require(_0xfc07('0x1'));var moment=require(_0xfc07('0x2'));var BPromise=require(_0xfc07('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfc07('0x4'));var db=require(_0xfc07('0x5'))['db'];var utils=require(_0xfc07('0x6'));var logger=require(_0xfc07('0x7'))('rpc');var config=require(_0xfc07('0x8'));var jayson=require(_0xfc07('0x9'));var client=jayson[_0xfc07('0xa')][_0xfc07('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2575b6,_0x18bd89,_0x25a800){return new BPromise(function(_0x5adaae,_0xf9f4bd){return client['request'](_0x2575b6,_0x25a800)[_0xfc07('0xc')](function(_0x4e822c){logger['info'](_0xfc07('0xd'),_0x18bd89,'request\x20sent');logger[_0xfc07('0xe')](_0xfc07('0xf'),_0x18bd89,_0xfc07('0x10'),JSON[_0xfc07('0x11')](_0x4e822c));if(_0x4e822c['error']){if(_0x4e822c[_0xfc07('0x12')][_0xfc07('0x13')]===0x1f4){logger['error'](_0xfc07('0xd'),_0x18bd89,_0x4e822c['error'][_0xfc07('0x14')]);return _0xf9f4bd(_0x4e822c[_0xfc07('0x12')]['message']);}logger[_0xfc07('0x12')](_0xfc07('0xd'),_0x18bd89,_0x4e822c[_0xfc07('0x12')][_0xfc07('0x14')]);return _0x5adaae(_0x4e822c[_0xfc07('0x12')][_0xfc07('0x14')]);}else{logger[_0xfc07('0x15')](_0xfc07('0xd'),_0x18bd89,_0xfc07('0x10'));_0x5adaae(_0x4e822c[_0xfc07('0x16')][_0xfc07('0x14')]);}})[_0xfc07('0x17')](function(_0x563d2a){logger['error'](_0xfc07('0xd'),_0x18bd89,_0x563d2a);_0xf9f4bd(_0x563d2a);});});}
\ No newline at end of file
+var _0x8634=['ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','request','then','info','License,\x20%s,\x20%s','debug','License,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','util','randomstring'];(function(_0x1c1150,_0x1cbe37){var _0x42051f=function(_0x428fd5){while(--_0x428fd5){_0x1c1150['push'](_0x1c1150['shift']());}};_0x42051f(++_0x1cbe37);}(_0x8634,0x17a));var _0x4863=function(_0x1a8ff0,_0x20788d){_0x1a8ff0=_0x1a8ff0-0x0;var _0x3588bf=_0x8634[_0x1a8ff0];return _0x3588bf;};'use strict';var _=require('lodash');var util=require(_0x4863('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4863('0x1'));var fs=require('fs');var Redis=require(_0x4863('0x2'));var db=require(_0x4863('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x4863('0x4'));var jayson=require(_0x4863('0x5'));var client=jayson[_0x4863('0x6')][_0x4863('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x5efae1,_0x2bb3cf,_0x3f9e5c){return new BPromise(function(_0x569d2c,_0x1297c7){return client[_0x4863('0x8')](_0x5efae1,_0x3f9e5c)[_0x4863('0x9')](function(_0x29bb12){logger[_0x4863('0xa')](_0x4863('0xb'),_0x2bb3cf,'request\x20sent');logger[_0x4863('0xc')](_0x4863('0xd'),_0x2bb3cf,_0x4863('0xe'),JSON[_0x4863('0xf')](_0x29bb12));if(_0x29bb12[_0x4863('0x10')]){if(_0x29bb12[_0x4863('0x10')][_0x4863('0x11')]===0x1f4){logger['error'](_0x4863('0xb'),_0x2bb3cf,_0x29bb12[_0x4863('0x10')][_0x4863('0x12')]);return _0x1297c7(_0x29bb12[_0x4863('0x10')][_0x4863('0x12')]);}logger['error']('License,\x20%s,\x20%s',_0x2bb3cf,_0x29bb12[_0x4863('0x10')][_0x4863('0x12')]);return _0x569d2c(_0x29bb12[_0x4863('0x10')]['message']);}else{logger[_0x4863('0xa')]('License,\x20%s,\x20%s',_0x2bb3cf,'request\x20sent');_0x569d2c(_0x29bb12['result'][_0x4863('0x12')]);}})[_0x4863('0x13')](function(_0x4c00fa){logger[_0x4863('0x10')](_0x4863('0xb'),_0x2bb3cf,_0x4c00fa);_0x1297c7(_0x4c00fa);});});}
\ No newline at end of file