Skip to content

Frontend Routes

DanielLaV edited this page Dec 10, 2021 · 4 revisions

User-facing routes

/login

Login page

This page displays a login form.

  • GET /login
  • POST /login

/signup

This page displays a signup form.

  • GET /signup
  • POST /signup

/

This page display the 10 most recent stories, as well as a navigation bar with login/signup or logout buttons. Each story has an update/delete button if it belongs to the currently logged in user. Logged in users can Like or Comment on the stories on this page.

  • GET /
  • POST /stories/:id/likes
  • DELETE /stories/:id/likes
  • POST /stories/:id/comments
  • DELETE /stories/:id/comments

/stories

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

  • GET /stories/new
  • POST /stories

/stories/:id

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

  • GET /stories/:id/edit
  • GET /stories/:id
  • POST /stories/:id/likes
  • DELETE /stories/:id/likes
  • POST /stories/:id/comments
  • DELETE /stories/:id/comments

/categories/:id

This page display the 10 stories with the same category, as well as a navigation bar with login/signup or logout buttons. Each story has an update/delete button if it belongs to the currently logged in user. Logged in users can Like or Comment on the stories on this page.

  • GET /categories/:id

Clone this wiki locally