Skip to content

built basic middleware express api#3

Open
GLSea1979 wants to merge 1 commit intocodefellows-javascript-401d13:masterfrom
GLSea1979:lab-gary-tuesday
Open

built basic middleware express api#3
GLSea1979 wants to merge 1 commit intocodefellows-javascript-401d13:masterfrom
GLSea1979:lab-gary-tuesday

Conversation

@GLSea1979
Copy link

No description provided.

fishRouter.put('/api/fish/:id', jsonParser, function(req, res, next) {
debug('PUT: /api/fish');

Fish.updateFish(req.query.id, req.body)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be req.params.id not req.query.id because you are passing the ID as a param not an query string. This is currently causing your tests to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants