-
Notifications
You must be signed in to change notification settings - Fork 446
Humberto Raya /back-end-project-week #495
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
base: master
Are you sure you want to change the base?
Conversation
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
deploying to heroku
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.
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) |
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.
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!
@johnoro