add user to Request for http-errors

req.user should be declared by developer.
This commit is contained in:
Cao Jiannan
2016-07-11 22:57:27 +08:00
committed by GitHub
parent 203818d338
commit cb4960033f
+6
View File
@@ -4,6 +4,12 @@
import * as createError from 'http-errors';
import * as express from 'express';
declare namespace Express {
export interface Request {
user: any
}
}
var app = express();
app.use(function (req, res, next) {