Skip to content

Front End Routes

philroberts13 edited this page Jan 20, 2022 · 8 revisions

User-facing routes

/landing

Log in page

This page displays a log in form

  • GET /landing
  • POST /landing

/users

This page displays a signup form.

Sign up page

  • GET /users
  • POST /users

/

This page displays the ten most recent answers with the question title and asked by ${user} attribute, as well as a navigation bar with an ask question button, a search bar, 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 answer a question or comment on answers on this page.

  • GET /
  • GET question pop up screen by clicking add question button in nav bar (addEventListener "click")

/questions

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

  • GET /questions
  • POST /questions

/questions/:id

This page displays individual questions with associated answers and comments on answers, as well as a navigation bar with an ask question button, a search bar, 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 post answers and comment on answers. The logged in owners of those answers and comments can update or delete them.

Q & A

  • GET /questions/:id
  • POST /questions/:id/answers
  • PUT /questions/:id
  • PUT /answers/:id

Comments

  • GET /answers/:id
  • POST /answers/:id/comments
  • PUT /comments/:id

Deleting Q, A, & Comments

  • DELETE /questions/:id
  • DELETE /answers/:id
  • DELETE /comments/:id

/topics

This page displays all topics placed on cards with a banner image, circular profile image and a short description as well as a navigation bar with an ask question button, a search bar, login/signup or logout buttons.

Topics

  • GET /topics
  • GET /topics/:id

Clone this wiki locally