Skip to content

Review #1

@bwreid

Description

@bwreid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions