Front End Routes - StevenBarnett1/Group_Project GitHub Wiki

User-facing routes

/login

Log in page

This page displays a log in form

  • GET /login
  • POST /login

/signup

This page displays a signup form.

Sign up page

  • GET /signup
  • POST /signup

/

This page displays the ten most recent Questions and their Votes, as well as a navigation bar with login/signup or logout buttons. Each Question has an update and delete button if it belongs to the currently logged in user. Logged in users can Vote on the Questions on this page.

  • GET /
  • POST /api/questions/:questionId/votes
  • DELETE /api/questions/:questionId/votes/:voteId
  • PUT /api/questions/:questionId/votes/:voteId

/create-question

This page displays a form with which a logged in user can craft a new Question, as well as a navigation bar with login/signup or logout buttons.

  • POST /

/questions/:id

This page displays individual Questions with associated answers and Votes, as well as a navigation bar with login/signup or logout buttons. If the logged in user owns the question, this page also displays an update and delete button. Logged in users can vote on the questions and answers on this page, and can post answers. The logged in owners of those answers can update or delete them.

  • GET /questions/:questionId
  • POST /questions/:questionId/votes
  • DELETE /api/questions/:questionId/votes/:voteId
  • PUT /api/questions/:questionId/votes/:voteId
  • POST /api/questions/:questionId/answers

/answers/:id

This page displays an individual answer with associated comments, as well as a navigation bar with login/signup or logout buttons. If the logged in user owns the answer, this page also displays an update and delete button. Logged in users can post comments to this answer. The logged in owners of those comments can update or delete them.

  • POST /api/answers/:answerId/comments
  • PUT /api/answers/:id
  • DELETE /api/answers/:id

/comments/:id

This page displays an individual comment, as well as a navigation bar with login/signup or logout buttons. If the logged in user owns the comment, this page also displays an update and delete button.

  • DELETE /api/comments/:commentId
  • PUT /api/comments/:commentId