Comparing version 2.2.3 to 2.2.4
@@ -42,2 +42,4 @@ 'use strict'; | ||
var userInfoCookie = req.signedCookies[_constants.kSessionUserInfoKey]; | ||
debug('userInfoCookie:', req.signedCookies); | ||
debug('cookes:', req.cookies); | ||
var userId = null; | ||
@@ -44,0 +46,0 @@ if (userInfoCookie) { |
@@ -33,2 +33,6 @@ 'use strict'; | ||
var _fetchDataFromRpc = require('../rpc/fetchDataFromRpc'); | ||
var _fetchDataFromRpc2 = _interopRequireDefault(_fetchDataFromRpc); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -39,2 +43,3 @@ | ||
function* fetchUserInfoWithUserId(userId) { | ||
console.log('fetchUserInfoWithUserId:L11:', userId); | ||
if (!userId) { | ||
@@ -46,5 +51,7 @@ return Promise.reject(new Error('userId不能为空')); | ||
userInfo = yield fetchUserInfoFromRedisWithUserId(userId); | ||
console.log('userInfo:L18:', userInfo.objectId); | ||
} catch (e) { | ||
try { | ||
userInfo = yield fetchUserInfoFromServerWithUserId(userId); | ||
console.log('userInfo:L22:', userInfo.objectId); | ||
} catch (error) { | ||
@@ -58,6 +65,7 @@ return Promise.reject(error); | ||
try { | ||
var _ref = yield fetchDataFromRpc(_config2.default.url.ibeHome + './v1.0/user/' + userId + '.json'); | ||
var _ref = yield (0, _fetchDataFromRpc2.default)(_config2.default.url.ibeHome + '/rpc/v1.0/user/' + userId + '.json'); | ||
var userInfo = _ref.userInfo; | ||
console.log('userInfo:L33', userInfo.objectId); | ||
yield setUserInfoForRedis(userInfo); | ||
@@ -64,0 +72,0 @@ return Promise.resolve(userInfo); |
{ | ||
"name": "ibe-utils", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "To Be A Better Me.", | ||
@@ -5,0 +5,0 @@ "license": "", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119977
1546