Skip to content
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

Clean up Spot routes #7

Open
jadnco opened this issue Feb 29, 2016 · 0 comments
Open

Clean up Spot routes #7

jadnco opened this issue Feb 29, 2016 · 0 comments

Comments

@jadnco
Copy link
Owner

jadnco commented Feb 29, 2016

This issue mostly has to do with this:

router.route('/users/:id/spots')
  .get((req, res) => {
    User.getSpots(req.params.id, req, res);
  })
  .post((req, res) => {
    Spot.create(req.params.id, req, res);
  })
  .delete((req, res) => {
    Spot.remove(req.params.id, req, res);
  });

What I need to figure out is:

  • Does a new Spot get created at users/:id/spots or just /spots
  • Does the spotter id association come from the :id in the URL or is it sent as part of the body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant