Skip to content

Commit a648976

Browse files
committed
final fixes
1 parent fdc9ca4 commit a648976

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

examples/error-pages/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ app.get('/500', function(req, res, next){
6060
// $ curl http://localhost:3000/notfound -H "Accept: application/json"
6161
// $ curl http://localhost:3000/notfound -H "Accept: text/plain"
6262

63-
app.use(function(req, res){
63+
app.use(function(req, res, next){
6464
res.status(404);
6565

6666
res.format({
@@ -88,7 +88,7 @@ app.use(function(req, res){
8888
// would remain being executed, however here
8989
// we simply respond with an error page.
9090

91-
app.use(function(err, req, res){
91+
app.use(function(err, req, res, next){
9292
// we may use properties of the error object
9393
// here and next(err) appropriately, or if
9494
// we possibly recovered from the error, simply next().

examples/mvc/controllers/pet/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ exports.before = function(req, res, next){
1515
next();
1616
};
1717

18-
exports.show = function(req, res){
18+
exports.show = function(req, res, next){
1919
res.render('show', { pet: req.pet });
2020
};
2121

22-
exports.edit = function(req, res){
22+
exports.edit = function(req, res, next){
2323
res.render('edit', { pet: req.pet });
2424
};
2525

26-
exports.update = function(req, res){
26+
exports.update = function(req, res, next){
2727
var body = req.body;
2828
req.pet.name = body.pet.name;
2929
res.message('Information updated!');

examples/mvc/controllers/user/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ exports.before = function(req, res, next){
2121
});
2222
};
2323

24-
exports.list = function(req, res){
24+
exports.list = function(req, res, next){
2525
res.render('list', { users: db.users });
2626
};
2727

28-
exports.edit = function(req, res){
28+
exports.edit = function(req, res, next){
2929
res.render('edit', { user: req.user });
3030
};
3131

32-
exports.show = function(req, res){
32+
exports.show = function(req, res, next){
3333
res.render('show', { user: req.user });
3434
};
3535

36-
exports.update = function(req, res){
36+
exports.update = function(req, res, next){
3737
var body = req.body;
3838
req.user.name = body.user.name;
3939
res.message('Information updated!');

0 commit comments

Comments
 (0)