Skip to content

Conversation

@hraya
Copy link

@hraya hraya commented Feb 14, 2019

began to add dependecies

began file structure
will seed some data for testing purposes
began to set up dbConfig file
completed the get all notes endpoint
all endpoints work properly, tested through postman
@hraya
Copy link
Author

hraya commented Feb 14, 2019

Copy link

@johnoro johnoro left a comment

Choose a reason for hiding this comment

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

Looks great! It'd be a good idea to include your deployed link somewhere easily visible for people like me.

.then(ids =>{
db.findById(ids[0])
.then(notes=>{
res.status(201).json(note)
Copy link

Choose a reason for hiding this comment

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

Notice the difference between the callback's parameter name and the name of the variable you're sending back: notes vs note. The data that you're sending back is the req.body that the client sent over. This doesn't include the new id since you're not sending back your innermost callback parameter!

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