Built motion from commit e02f907f.|2.6.14
[motion2.git] / server / api / license / license.rpc.js
index 4ff7eb1..0e6bdf9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa1b9=['stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','then','info','License,\x20%s,\x20%s','debug','License,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x1e68ef,_0xdf3d70){var _0x52f08d=function(_0x3ea64f){while(--_0x3ea64f){_0x1e68ef['push'](_0x1e68ef['shift']());}};_0x52f08d(++_0xdf3d70);}(_0xa1b9,0x1bb));var _0x9a1b=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xa1b9[_0x4cf98e];return _0x1623ac;};'use strict';var _=require('lodash');var util=require(_0x9a1b('0x0'));var moment=require(_0x9a1b('0x1'));var BPromise=require(_0x9a1b('0x2'));var rs=require(_0x9a1b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9a1b('0x4'))['db'];var utils=require(_0x9a1b('0x5'));var logger=require('../../config/logger')(_0x9a1b('0x6'));var config=require('../../config/environment');var jayson=require(_0x9a1b('0x7'));var client=jayson[_0x9a1b('0x8')][_0x9a1b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2a9199,_0xc5dac1,_0xa37c07){return new BPromise(function(_0x35756e,_0x240e25){return client[_0x9a1b('0xa')](_0x2a9199,_0xa37c07)[_0x9a1b('0xb')](function(_0x381c87){logger[_0x9a1b('0xc')](_0x9a1b('0xd'),_0xc5dac1,'request\x20sent');logger[_0x9a1b('0xe')](_0x9a1b('0xf'),_0xc5dac1,_0x9a1b('0x10'),JSON[_0x9a1b('0x11')](_0x381c87));if(_0x381c87[_0x9a1b('0x12')]){if(_0x381c87[_0x9a1b('0x12')][_0x9a1b('0x13')]===0x1f4){logger['error'](_0x9a1b('0xd'),_0xc5dac1,_0x381c87[_0x9a1b('0x12')]['message']);return _0x240e25(_0x381c87[_0x9a1b('0x12')][_0x9a1b('0x14')]);}logger[_0x9a1b('0x12')]('License,\x20%s,\x20%s',_0xc5dac1,_0x381c87['error']['message']);return _0x35756e(_0x381c87[_0x9a1b('0x12')][_0x9a1b('0x14')]);}else{logger[_0x9a1b('0xc')](_0x9a1b('0xd'),_0xc5dac1,_0x9a1b('0x10'));_0x35756e(_0x381c87[_0x9a1b('0x15')]['message']);}})[_0x9a1b('0x16')](function(_0x49b8a7){logger[_0x9a1b('0x12')](_0x9a1b('0xd'),_0xc5dac1,_0x49b8a7);_0x240e25(_0x49b8a7);});});}
\ No newline at end of file
+var _0xba10=['result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','http','request','then','License,\x20%s,\x20%s','debug','request\x20sent','error','message','info'];(function(_0x31cb5f,_0x2df766){var _0x586042=function(_0x53c807){while(--_0x53c807){_0x31cb5f['push'](_0x31cb5f['shift']());}};_0x586042(++_0x2df766);}(_0xba10,0x106));var _0x0ba1=function(_0x31eeb3,_0x4f3abb){_0x31eeb3=_0x31eeb3-0x0;var _0x31b430=_0xba10[_0x31eeb3];return _0x31b430;};'use strict';var _=require(_0x0ba1('0x0'));var util=require(_0x0ba1('0x1'));var moment=require(_0x0ba1('0x2'));var BPromise=require('bluebird');var rs=require(_0x0ba1('0x3'));var fs=require('fs');var Redis=require(_0x0ba1('0x4'));var db=require(_0x0ba1('0x5'))['db'];var utils=require(_0x0ba1('0x6'));var logger=require('../../config/logger')(_0x0ba1('0x7'));var config=require('../../config/environment');var jayson=require(_0x0ba1('0x8'));var client=jayson['client'][_0x0ba1('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x14d64f,_0x1a9c50,_0x276106){return new BPromise(function(_0x345884,_0x1c30ad){return client[_0x0ba1('0xa')](_0x14d64f,_0x276106)[_0x0ba1('0xb')](function(_0x2a8cd2){logger['info'](_0x0ba1('0xc'),_0x1a9c50,'request\x20sent');logger[_0x0ba1('0xd')]('License,\x20%s,\x20%s,\x20%s',_0x1a9c50,_0x0ba1('0xe'),JSON['stringify'](_0x2a8cd2));if(_0x2a8cd2[_0x0ba1('0xf')]){if(_0x2a8cd2[_0x0ba1('0xf')]['code']===0x1f4){logger[_0x0ba1('0xf')](_0x0ba1('0xc'),_0x1a9c50,_0x2a8cd2[_0x0ba1('0xf')][_0x0ba1('0x10')]);return _0x1c30ad(_0x2a8cd2['error'][_0x0ba1('0x10')]);}logger['error'](_0x0ba1('0xc'),_0x1a9c50,_0x2a8cd2['error']['message']);return _0x345884(_0x2a8cd2[_0x0ba1('0xf')][_0x0ba1('0x10')]);}else{logger[_0x0ba1('0x11')](_0x0ba1('0xc'),_0x1a9c50,'request\x20sent');_0x345884(_0x2a8cd2[_0x0ba1('0x12')][_0x0ba1('0x10')]);}})[_0x0ba1('0x13')](function(_0x2e6315){logger[_0x0ba1('0xf')]('License,\x20%s,\x20%s',_0x1a9c50,_0x2e6315);_0x1c30ad(_0x2e6315);});});}
\ No newline at end of file