-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unification of error messages for e2e test #87
Unification of error messages for e2e test #87
Conversation
@lholmquist Please, code review |
app.js
Outdated
@@ -29,7 +29,7 @@ const db = require('./lib/db'); | |||
|
|||
const fruits = require('./lib/routes/fruits'); | |||
|
|||
app.use(bodyParser.json()); | |||
app.use(bodyParser.text({ type: 'application/json' })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to do this. isn't this just another way of writing bodyParser.json()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I look at on it.
lib/routes/fruits.js
Outdated
if (result.rowCount === 0) { | ||
response.status(404); | ||
return response.send(`Unknown item ${id}`); | ||
} | ||
return response.sendStatus(204); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think there is any reason to remove that return
. it technically doesn't need to be there, but the other methods have it, so we should keep it for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
@akoniar once those other issues are fixed, i can probably merge this |
@akoniar looks like travis is broken |
@akoniar still broken. you should probably run |
No description provided.