Built motion from commit 013e4bb4.|2.6.18
[motion2.git] / server / api / license / license.rpc.js
index 9b18bd4..7a1a97c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0bfd=['info','License,\x20%s,\x20%s','request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x373f3c,_0x44e12b){var _0x555326=function(_0x5dd8d9){while(--_0x5dd8d9){_0x373f3c['push'](_0x373f3c['shift']());}};_0x555326(++_0x44e12b);}(_0x0bfd,0x163));var _0xd0bf=function(_0x2e4aa0,_0x65c666){_0x2e4aa0=_0x2e4aa0-0x0;var _0x59a58c=_0x0bfd[_0x2e4aa0];return _0x59a58c;};'use strict';var _=require('lodash');var util=require(_0xd0bf('0x0'));var moment=require(_0xd0bf('0x1'));var BPromise=require(_0xd0bf('0x2'));var rs=require(_0xd0bf('0x3'));var fs=require('fs');var Redis=require(_0xd0bf('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xd0bf('0x5'));var logger=require(_0xd0bf('0x6'))(_0xd0bf('0x7'));var config=require(_0xd0bf('0x8'));var jayson=require(_0xd0bf('0x9'));var client=jayson[_0xd0bf('0xa')][_0xd0bf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x458a31,_0x2f2d30,_0x108f85){return new BPromise(function(_0x2846e9,_0x47efe1){return client[_0xd0bf('0xc')](_0x458a31,_0x108f85)['then'](function(_0x4fb51b){logger[_0xd0bf('0xd')](_0xd0bf('0xe'),_0x2f2d30,_0xd0bf('0xf'));logger[_0xd0bf('0x10')](_0xd0bf('0x11'),_0x2f2d30,_0xd0bf('0xf'),JSON[_0xd0bf('0x12')](_0x4fb51b));if(_0x4fb51b[_0xd0bf('0x13')]){if(_0x4fb51b[_0xd0bf('0x13')]['code']===0x1f4){logger[_0xd0bf('0x13')]('License,\x20%s,\x20%s',_0x2f2d30,_0x4fb51b['error']['message']);return _0x47efe1(_0x4fb51b[_0xd0bf('0x13')][_0xd0bf('0x14')]);}logger['error'](_0xd0bf('0xe'),_0x2f2d30,_0x4fb51b['error'][_0xd0bf('0x14')]);return _0x2846e9(_0x4fb51b[_0xd0bf('0x13')][_0xd0bf('0x14')]);}else{logger['info'](_0xd0bf('0xe'),_0x2f2d30,_0xd0bf('0xf'));_0x2846e9(_0x4fb51b[_0xd0bf('0x15')][_0xd0bf('0x14')]);}})[_0xd0bf('0x16')](function(_0x13eec1){logger[_0xd0bf('0x13')](_0xd0bf('0xe'),_0x2f2d30,_0x13eec1);_0x47efe1(_0x13eec1);});});}
\ No newline at end of file
+var _0xe0c4=['debug','License,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','License,\x20%s,\x20%s','message','info','result','catch','lodash','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x870b62,_0x2143f9){var _0x2dcb39=function(_0x2fb63d){while(--_0x2fb63d){_0x870b62['push'](_0x870b62['shift']());}};_0x2dcb39(++_0x2143f9);}(_0xe0c4,0x180));var _0x4e0c=function(_0x48fa1b,_0x369aa5){_0x48fa1b=_0x48fa1b-0x0;var _0x6b81a5=_0xe0c4[_0x48fa1b];return _0x6b81a5;};'use strict';var _=require(_0x4e0c('0x0'));var util=require('util');var moment=require(_0x4e0c('0x1'));var BPromise=require('bluebird');var rs=require(_0x4e0c('0x2'));var fs=require('fs');var Redis=require(_0x4e0c('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x4e0c('0x4'));var logger=require(_0x4e0c('0x5'))(_0x4e0c('0x6'));var config=require(_0x4e0c('0x7'));var jayson=require(_0x4e0c('0x8'));var client=jayson['client'][_0x4e0c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x41f78b,_0x18f5be,_0x2fc3ee){return new BPromise(function(_0x5632ba,_0xe7d9d6){return client[_0x4e0c('0xa')](_0x41f78b,_0x2fc3ee)[_0x4e0c('0xb')](function(_0x3b1a15){logger['info']('License,\x20%s,\x20%s',_0x18f5be,'request\x20sent');logger[_0x4e0c('0xc')](_0x4e0c('0xd'),_0x18f5be,_0x4e0c('0xe'),JSON['stringify'](_0x3b1a15));if(_0x3b1a15['error']){if(_0x3b1a15[_0x4e0c('0xf')][_0x4e0c('0x10')]===0x1f4){logger[_0x4e0c('0xf')](_0x4e0c('0x11'),_0x18f5be,_0x3b1a15[_0x4e0c('0xf')]['message']);return _0xe7d9d6(_0x3b1a15['error']['message']);}logger['error'](_0x4e0c('0x11'),_0x18f5be,_0x3b1a15[_0x4e0c('0xf')][_0x4e0c('0x12')]);return _0x5632ba(_0x3b1a15['error'][_0x4e0c('0x12')]);}else{logger[_0x4e0c('0x13')](_0x4e0c('0x11'),_0x18f5be,_0x4e0c('0xe'));_0x5632ba(_0x3b1a15[_0x4e0c('0x14')][_0x4e0c('0x12')]);}})[_0x4e0c('0x15')](function(_0x421448){logger['error'](_0x4e0c('0x11'),_0x18f5be,_0x421448);_0xe7d9d6(_0x421448);});});}
\ No newline at end of file