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

Backend Routes #3

Open
3 of 12 tasks
dsuh93 opened this issue Dec 29, 2021 · 0 comments
Open
3 of 12 tasks

Backend Routes #3

dsuh93 opened this issue Dec 29, 2021 · 0 comments

Comments

@dsuh93
Copy link

dsuh93 commented Dec 29, 2021

hey andy, good job on your backend routes, some comments for revision:

Backend Routes

  • Contains the following sections: HTML, API Endpoints(Backend)
  • Each route has a description
  • API Endpoint routes contains wildcard variables written in snake_case
  • Routes does not contain superfluous routes
  • Have API routes that will allow the front end to get all info it needs and does not have unneeded routes:
    • i.e. probably don't need a GET likes api endpoint because that info comes through the post show

Comments

  • users: "GET /api/stocks/:stock_id/users returns list of users that are watching a particular stock": you should just be able to use your GET /api/users/:id to retrieve stocks being watched by a user via associations, so this route is unnecessary
  • users: GET /api/users/search not sure how you're searching for people in robinhood? don't think this is necessary
  • stocks: "GET /api/stocks - used" missing detail on what you plan on doing with this route
  • stocks: POST /api/stocks, PATCH /api/stocks/:id, DELETE /api/stocks/:id - don't think users should have the ability to create, edit, or delete a stock, not part of your stocks MVP, stocks should be pre-seeded
  • stocks: GET /api/stocks/search if you're using a query string, make sure you look up how to add that information correctly and grab it from the backend (probably need to dynamically add the search parameters when making the ajax request using a '?', and then accessing the params in the controller)
  • watchlists: don't need a separate route for grabbing a user's watchlist, can be done when grabbing the user via associations
  • missing routes for handling when a user buys a stock, sells a stock, buys more of the same stock (edit) etc.
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

No branches or pull requests

1 participant