- fix: return the item saved

This commit is contained in:
Paolo Arena
2019-02-08 17:11:33 +01:00
parent 87378fe732
commit 318ff7a798
7 changed files with 35 additions and 17 deletions

View File

@@ -81,11 +81,11 @@ app.use('/todos', todos_router);
app.use('/users', users_router);
// catch 404 and forward to error handler
app.use(function (req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});
// app.use(function (req, res, next) {
// var err = new Error('Not Found');
// err.status = 404;
// next(err);
// });
// app.set('views', path.join(__dirname, 'views'));