Skip to content

Commit

Permalink
Change keepSessionData to keepSessionData.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed May 19, 2022
1 parent 46756e5 commit 4f6bd5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/sessionmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SessionManager.prototype.logIn = function(req, user, options, cb) {
if (err) {
return cb(err);
}
if (options.keepSessionData) {
if (options.keepSessionInfo) {
Object.assign(req.session, prevSession);
}
if (!req.session[self._key]) {
Expand Down Expand Up @@ -82,7 +82,7 @@ SessionManager.prototype.logOut = function(req, options, cb) {
if (err) {
return cb(err);
}
if (options.keepSessionData) {
if (options.keepSessionInfo) {
Object.assign(req.session, prevSession);
}
cb();
Expand Down
4 changes: 2 additions & 2 deletions test/http/request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ describe('http.ServerRequest', function() {
before(function(done) {
var user = { id: '1', username: 'root' };

req.login(user, { keepSessionData: true }, function(err) {
req.login(user, { keepSessionInfo: true }, function(err) {
error = err;
done();
});
Expand Down Expand Up @@ -803,7 +803,7 @@ describe('http.ServerRequest', function() {
var error;

before(function(done) {
req.logout({ keepSessionData: true }, function(err) {
req.logout({ keepSessionInfo: true }, function(err) {
error = err;
done();
});
Expand Down

0 comments on commit 4f6bd5b

Please sign in to comment.