Skip to content

Commit

Permalink
Fixed typo in sample code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bow-fujita committed Feb 25, 2017
1 parent e4daa63 commit 6a46161
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,19 @@ module.exports = {
}

, list: (req, res, next) => {
project().findAll()
project(req).findAll()
.then((rows) => { res.json(rows); })
.catch(next);
}

, view: (req, res, next) => {
project().findById(req.params.id)
project(req).findById(req.params.id)
.then((row) => { row ? res.json(row) : res.status(404); })
.catch(next);
}

, create: (req, res, next) => {
project().create({
project(req).create({
title: req.body.title
, description: req.body.description
})
Expand All @@ -213,7 +213,7 @@ module.exports = {
}

, update: (req, res, next) => {
project().findById(req.params.id)
project(req).findById(req.params.id)
.then((row) => {
if (!row) {
res.status(404);
Expand All @@ -229,7 +229,7 @@ module.exports = {
}

, remove: (req, res, next) => {
project().findById(req.params.id)
project(req).findById(req.params.id)
.then((row) => row ? row.destroy() : Promise.resolve())
.then(() => { res.end(); });
.catch(next);
Expand Down

0 comments on commit 6a46161

Please sign in to comment.