Skip to content

J.Sorge w3 Exercise#26

Open
Jiansorge wants to merge 1 commit intopce-uw-jscript400:masterfrom
Jiansorge:master
Open

J.Sorge w3 Exercise#26
Jiansorge wants to merge 1 commit intopce-uw-jscript400:masterfrom
Jiansorge:master

Conversation

@Jiansorge
Copy link

No description provided.

Copy link
Collaborator

@bwreid bwreid left a comment

Choose a reason for hiding this comment

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

This looks really excellent. Just left some code quality comments, but overall great job.

// }
// ]
// }
// ];
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can just delete this as opposed to commenting it out.

const status = 200
const book = await Books.findById(req.params.bookId)
const author = book.authors.id(req.params.authorId)
.remove()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could all be on one line and still be really readable! Nice. :)

title: req.body.title,
published: req.body.published,
authors: req.body.authors
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could use destructuring 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