Skip to content

Commit

Permalink
final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raksbisht committed Feb 7, 2023
1 parent fdc9ca4 commit a648976
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/error-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ app.get('/500', function(req, res, next){
// $ curl http://localhost:3000/notfound -H "Accept: application/json"
// $ curl http://localhost:3000/notfound -H "Accept: text/plain"

app.use(function(req, res){
app.use(function(req, res, next){
res.status(404);

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

app.use(function(err, req, res){
app.use(function(err, req, res, next){
// we may use properties of the error object
// here and next(err) appropriately, or if
// we possibly recovered from the error, simply next().
Expand Down
6 changes: 3 additions & 3 deletions examples/mvc/controllers/pet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ exports.before = function(req, res, next){
next();
};

exports.show = function(req, res){
exports.show = function(req, res, next){
res.render('show', { pet: req.pet });
};

exports.edit = function(req, res){
exports.edit = function(req, res, next){
res.render('edit', { pet: req.pet });
};

exports.update = function(req, res){
exports.update = function(req, res, next){
var body = req.body;
req.pet.name = body.pet.name;
res.message('Information updated!');
Expand Down
8 changes: 4 additions & 4 deletions examples/mvc/controllers/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ exports.before = function(req, res, next){
});
};

exports.list = function(req, res){
exports.list = function(req, res, next){
res.render('list', { users: db.users });
};

exports.edit = function(req, res){
exports.edit = function(req, res, next){
res.render('edit', { user: req.user });
};

exports.show = function(req, res){
exports.show = function(req, res, next){
res.render('show', { user: req.user });
};

exports.update = function(req, res){
exports.update = function(req, res, next){
var body = req.body;
req.user.name = body.user.name;
res.message('Information updated!');
Expand Down

0 comments on commit a648976

Please sign in to comment.