Skip to content

Frontend Routes

rzh150030 edited this page May 28, 2021 · 9 revisions
  • User-facing routes

/login

Log in page

This page displays a login form

  • GET /login
  • POST /login

/signup

Sign-up page

This page displays a signup form.

Sign up page

  • GET /signup
  • POST /signup

/

Frontpage

This page will have a navbar that always displays an "Ask Question" button.

If the user is not logged in, the page will show the 5 most recent questions asked. There will be a navigation bar that displays the "Log in" and "Sign Up" buttons.

If a regular user is logged in, the page will display their 5 most recently asked questions. The vote score of each question will be displayed. Displays the user name and "Ask Question" button in the navbar.

If a professional user is logged in, the page will display their 5 most recently asked and 5 most recently answered questions. The vote score of each question and answer will be displayed. Displays the user name and "Ask Question" button in the navbar.

  • GET /
  • POST /questions

/questions/:id

This page displays a question along with its associated answers. If the logged in user is a professional, the page will allow the user to answer with an answer form. The question and answers can be upvoted or downvoted if the user is a professional.

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

/questions

This page displays a form where a logged in user can ask a question.

  • GET /questions
  • POST /questions
Clone this wiki locally