Skip to content

Humberto Raya /back-end-project-week#495

Open
hraya wants to merge 11 commits into
bloominstituteoftechnology:masterfrom
hraya:master
Open

Humberto Raya /back-end-project-week#495
hraya wants to merge 11 commits into
bloominstituteoftechnology:masterfrom
hraya:master

Conversation

@hraya

@hraya hraya commented Feb 14, 2019

Copy link
Copy Markdown

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

hraya commented Feb 14, 2019

Copy link
Copy Markdown
Author

@johnoro johnoro left a comment

Copy link
Copy Markdown

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.

Comment thread index.js
.then(ids =>{
db.findById(ids[0])
.then(notes=>{
res.status(201).json(note)

Copy link
Copy Markdown

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