Merge remote-tracking branch 'upstream/master' into merge_7_25

This commit is contained in:
Ryan Cavanaugh
2016-07-27 10:57:46 -07:00
312 changed files with 30687 additions and 5238 deletions
+8 -1
View File
@@ -4,12 +4,19 @@ import * as express from 'express';
var app = express();
declare global {
namespace Express {
export interface Request {
user?: any
}
}
}
app.use(function (req, res, next) {
if (!req.user) return next(createError(401, 'Please login to view this page.'));
next();
});
/* Examples taken from https://github.com/jshttp/http-errors/blob/1.3.1/test/test.js */
// createError(status)