mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-18 04:24:30 +08:00
Fixing implicit type in test
This commit is contained in:
@@ -9,7 +9,7 @@ var app = express()
|
||||
|
||||
app.use(expressValidator());
|
||||
|
||||
app.post('/:urlparam', function(req: expressValidator.ValidatedRequest, res) {
|
||||
app.post('/:urlparam', function(req: expressValidator.ValidatedRequest, res: express.Response) {
|
||||
|
||||
// checkBody only checks req.body; none of the other req parameters
|
||||
// Similarly checkParams only checks in req.params (URL params) and
|
||||
@@ -27,7 +27,7 @@ app.post('/:urlparam', function(req: expressValidator.ValidatedRequest, res) {
|
||||
|
||||
var errors = req.validationErrors();
|
||||
if (errors) {
|
||||
res.send('There have been validation errors: ' + util.inspect(errors), 400);
|
||||
res.status(400).send('There have been validation errors: ' + util.inspect(errors));
|
||||
return;
|
||||
}
|
||||
res.json({
|
||||
|
||||
Reference in New Issue
Block a user