X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Flicense%2Flicense.rpc.js;h=9d41ee7177c3d53a4866c5b5f8c78fa32992ecd0;hb=44bd2814959684a7f7b774f2c71a3b12f9ba5952;hp=227f3343379f2f48e87782f40fff882f34c22d88;hpb=d0e53397894213749637bb93a101e4fc9544eaa3;p=motion2.git diff --git a/server/api/license/license.rpc.js b/server/api/license/license.rpc.js index 227f334..9d41ee7 100644 --- a/server/api/license/license.rpc.js +++ b/server/api/license/license.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3aa2=['lodash','util','bluebird','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','License,\x20%s,\x20%s','debug','License,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x3aa2,0x13b));var _0x23aa=function(_0x26394d,_0x547eea){_0x26394d=_0x26394d-0x0;var _0x5c7861=_0x3aa2[_0x26394d];return _0x5c7861;};'use strict';var _=require(_0x23aa('0x0'));var util=require(_0x23aa('0x1'));var moment=require('moment');var BPromise=require(_0x23aa('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x23aa('0x3'))['db'];var utils=require(_0x23aa('0x4'));var logger=require('../../config/logger')(_0x23aa('0x5'));var config=require('../../config/environment');var jayson=require(_0x23aa('0x6'));var client=jayson[_0x23aa('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x461bde,_0xacc1a7,_0x31e9e4){return new BPromise(function(_0x5f3efd,_0x41bfc5){return client[_0x23aa('0x8')](_0x461bde,_0x31e9e4)[_0x23aa('0x9')](function(_0x5c2595){logger['info'](_0x23aa('0xa'),_0xacc1a7,'request\x20sent');logger[_0x23aa('0xb')](_0x23aa('0xc'),_0xacc1a7,_0x23aa('0xd'),JSON[_0x23aa('0xe')](_0x5c2595));if(_0x5c2595[_0x23aa('0xf')]){if(_0x5c2595[_0x23aa('0xf')][_0x23aa('0x10')]===0x1f4){logger['error']('License,\x20%s,\x20%s',_0xacc1a7,_0x5c2595['error'][_0x23aa('0x11')]);return _0x41bfc5(_0x5c2595[_0x23aa('0xf')][_0x23aa('0x11')]);}logger[_0x23aa('0xf')](_0x23aa('0xa'),_0xacc1a7,_0x5c2595[_0x23aa('0xf')][_0x23aa('0x11')]);return _0x5f3efd(_0x5c2595[_0x23aa('0xf')]['message']);}else{logger[_0x23aa('0x12')]('License,\x20%s,\x20%s',_0xacc1a7,'request\x20sent');_0x5f3efd(_0x5c2595[_0x23aa('0x13')][_0x23aa('0x11')]);}})[_0x23aa('0x14')](function(_0x4300a0){logger[_0x23aa('0xf')](_0x23aa('0xa'),_0xacc1a7,_0x4300a0);_0x41bfc5(_0x4300a0);});});} \ No newline at end of file +var _0x1cf3=['request\x20sent','License,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','License,\x20%s,\x20%s'];(function(_0x148879,_0x5b4c11){var _0x4f7027=function(_0xad056b){while(--_0xad056b){_0x148879['push'](_0x148879['shift']());}};_0x4f7027(++_0x5b4c11);}(_0x1cf3,0x1be));var _0x31cf=function(_0x2d4a6c,_0xed414d){_0x2d4a6c=_0x2d4a6c-0x0;var _0xfe662e=_0x1cf3[_0x2d4a6c];return _0xfe662e;};'use strict';var _=require(_0x31cf('0x0'));var util=require(_0x31cf('0x1'));var moment=require(_0x31cf('0x2'));var BPromise=require(_0x31cf('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x31cf('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x31cf('0x5'));var logger=require(_0x31cf('0x6'))(_0x31cf('0x7'));var config=require(_0x31cf('0x8'));var jayson=require(_0x31cf('0x9'));var client=jayson[_0x31cf('0xa')][_0x31cf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1830b4,_0x2581c4,_0x6be80){return new BPromise(function(_0x3f7b2e,_0x3fa83e){return client[_0x31cf('0xc')](_0x1830b4,_0x6be80)[_0x31cf('0xd')](function(_0x56e8f6){logger[_0x31cf('0xe')](_0x31cf('0xf'),_0x2581c4,_0x31cf('0x10'));logger['debug'](_0x31cf('0x11'),_0x2581c4,_0x31cf('0x10'),JSON[_0x31cf('0x12')](_0x56e8f6));if(_0x56e8f6[_0x31cf('0x13')]){if(_0x56e8f6[_0x31cf('0x13')]['code']===0x1f4){logger['error'](_0x31cf('0xf'),_0x2581c4,_0x56e8f6[_0x31cf('0x13')][_0x31cf('0x14')]);return _0x3fa83e(_0x56e8f6[_0x31cf('0x13')]['message']);}logger[_0x31cf('0x13')](_0x31cf('0xf'),_0x2581c4,_0x56e8f6[_0x31cf('0x13')]['message']);return _0x3f7b2e(_0x56e8f6[_0x31cf('0x13')][_0x31cf('0x14')]);}else{logger[_0x31cf('0xe')](_0x31cf('0xf'),_0x2581c4,'request\x20sent');_0x3f7b2e(_0x56e8f6['result'][_0x31cf('0x14')]);}})[_0x31cf('0x15')](function(_0x2d5532){logger['error'](_0x31cf('0xf'),_0x2581c4,_0x2d5532);_0x3fa83e(_0x2d5532);});});} \ No newline at end of file