Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

session.get() -> session.load()

  • Loading branch information...
commit c5030fa1a4f9812b6de84b098a9501d8bcd44c72 1 parent bd5863d
@cravler cravler authored committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  middleware/session.js
View
3  middleware/session.js
@@ -8,8 +8,9 @@ module.exports = function(options) {
req.sessionID = req.cookies[options.key];
if (req.sessionID) {
- options.store.get(req.sessionID, function(err, session) {
+ options.store.load(req.sessionID, function(err, session) {
if (err) return next(err);
+ if (!session) return next(new Error('Session not found'));
req.session = session;
next();
});
Please sign in to comment.
Something went wrong with that request. Please try again.