Hi Ryan,
Please find my notes below.
- Units query: I believe this will work for everything but
occupied=true/false
- Create Unit: You'll want this to have a
.then() and put the code that follows inside of it. As of right now, this statement could fail and you would still respond as normal.
- Get Employee by ID: It looks like this will only match the employee if it's the first one?
- Create Employee: Did you mean
res.json()?
- Delete Employee: There are a few ways to do this. In this case, you could find the unit, get to the employees list (via JavaScript, not Mongoose), remove the specific employee through the array (e.g. with something like
.splice()), and the .save() the overall unit.
With the routes you have, things are looking pretty good! I would try and focus on the patterns present when working on each route. Although there were a number of routes in this project, a number of them were similar. Please let me know how I can help and/or review some of the previous lessons I've put up and try and diagnose each part.
Hi Ryan,
Please find my notes below.
occupied=true/false.then()and put the code that follows inside of it. As of right now, this statement could fail and you would still respond as normal.res.json()?.splice()), and the.save()the overall unit.With the routes you have, things are looking pretty good! I would try and focus on the patterns present when working on each route. Although there were a number of routes in this project, a number of them were similar. Please let me know how I can help and/or review some of the previous lessons I've put up and try and diagnose each part.