Skip to content

adding apis#15

Open
jaamp wants to merge 1 commit into
pce-uw-jscript400:masterfrom
jaamp:master
Open

adding apis#15
jaamp wants to merge 1 commit into
pce-uw-jscript400:masterfrom
jaamp:master

Conversation

@jaamp
Copy link
Copy Markdown

@jaamp jaamp commented Jul 10, 2019

No description provided.

Comment thread app.js

app.get('/fruits', (req, res, next) => {
const { fruits } = data
res.json(fruits)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This route should be modified to filter with query parameters.

Comment thread app.js
next({ status: 404, message })
}
else {
for (i=0; i<vegetables.length; i++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't forget to include var or let in your for loop.

Comment thread app.js
if (fruits[i].id === id) {
fruits.splice(i, 1);
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like you got some weird formatting here.

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