Skip to content

Frontend Routes

dianabeatriztinoco edited this page Aug 11, 2021 · 5 revisions

/

This page displays a photo feed if logged in, otherwise redirect to login/signup.

  • GET /

/login

This page displays a login form with a login option, a demo login option, and access to sign-up for an account.

  • GET /login
  • POST /login

/signup

This page displays a signup form.

  • GET /signup
  • POST /signup

/post/:id

This page displays a specific post and its details as well as the ability to delete a post if the logged-in user owns the post. This page also displays a comment section where you can view all comments, create a new comment, delete a comment posted by you, or update a comment posted by you.

  • GET /post/:id
  • POST/post/:id
  • DELETE /post/:id
  • POST /post/:id/comments
  • DELETE /post/:id/comments

/post/new

This page allows logged-in users to upload a new post on their page. Upon post, the user is redirected to the homepage - post displayed chronologically.

  • POST /post/new

/user/:id

This page redirects you to a user's profile page.

  • GET /user/:id

/user/:id/edit

This page is where a logged-in user can edit their bio (bonus: change username/profile pic)

  • GET /user/:id/edit
  • POST /user/:id/edit

/user/:id/followers

This page displays logged-in user's followers.

  • GET /user/:id/followers

/user/:id/following

This page displays users that logged in user is following.

  • GET /user/:id/following

Clone this wiki locally