mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
fixes based on feedback
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { passport } = require('../services/passport');
|
||||
const Context = require('../graph/context');
|
||||
const debug = require('debug')('talk:middleware:authentication');
|
||||
|
||||
const authentication = (req, res, next) =>
|
||||
@@ -22,6 +23,9 @@ const authentication = (req, res, next) =>
|
||||
debug('user was not on request');
|
||||
}
|
||||
|
||||
// Attach a new context to the request.
|
||||
req.context = new Context(req);
|
||||
|
||||
next();
|
||||
}
|
||||
)(req, res, next);
|
||||
|
||||
Reference in New Issue
Block a user