Routes - Gregory-DelCarlo/UnBlended GitHub Wiki
Html
- root to: “static_pages/root”
- static root page for react to load into
API backend
Users
- index
- show
- update
- POST “/api/users/:id”
- update database with new information for a user
- edit
- GET “/api/users/:id/edit”
- returns previous info for a user
- destroy
Whiskey
- index
- show
- GET “/api/whiskey/:id”
- return single whiskey with reviews
- update
- POST “/api/whiskey/:id”
- updates whiskey with new information
- edit
- GET “/api/whiskey/:id/edit”
- returns previous information on a whiskey
- destroy
- DELETE “/api/whiskey/:id”
Reviews
- show
- GET “/api/reviews/:id”
- returns single review with comments
- update
- POST “/api/reviews/:id”
- updates a review with new information
- edit
- GET “/api/reviews/:id/edit”
- returns old information on a review
- destroy
- DELETE “/api/reviews/:id”
Comments
- update
- POST “/api/comments/:comment_id”
- updates a comment with new information
- edit
- GET “/api/comments/:comment_id/edit”
- gets previous information on a comment
- destroy
- DELETE “/api/comments/:comment_id”
Whiskey List
- index
- GET “/api/lists”
- Return all lists filtered by frontend
- show
- update
- edit
- GET “/api/lists/:id/edit”
- destroy
Session
Frontend Routes
Users
UsersIndexContainer
- Used for rendering all users, in a container to map filtering functions to the presentational component
UserShow
- Show a single user, backend logic returns correct user
UserCreate
- Renders a form to create a new user
UserEdit
- Edits and updates a user's information
Whiskey
WhiskeyIndexContainer
- Used for rendering all drinks, and is filtered by selectors in container
WhiskeyShow
- Render's a single whiskey's information
WhiskeyCreate
- renders a form to create a new whiskey
WhiskeyEdit
- Edits and updates a whiskey's information
Reviews
ReviewsIndexContainer
- Container for filtering and then rendering reviews for a certain whiskey
ReviewShow
- Shows a single reviews details and comments
ReviewEdit
- Edits and updates a single review
Comments
CommentsIndexContainer
- Works the same as ReviewsIndex but for comments
CommentShow
CommentEdit
- Renders page to edit and update a comments information
Whiskey List
ListIndexContainer
- Shows all of a users list, filtered by selectors
ListShow
- Shows a single list and its drinks
ListCreate
Session
SignupContainer
- Form for a user to Signup
LoginContainer