Frontend Routes - adamLovettApps/solo-project-0521 GitHub Wiki

User Facing Routes

/

Landing Page

This page displays the most recent photos, chosen from all photos for users who are not logged in, and chosen from accounts the user follows if the user is logged in.

  • GET /

/users/:id

This page displays all the albums from a user.

  • GET /users/:id

/albums/:id

This page displays all the photos from a particular album.

  • GET /album/:id

/createAlbum

This page displays a form for a user to create a new album and redirects to the user's albums page.

  • GET /createAlbum
  • POST /createAlbum

/editAlbum/:id

This page displays a form that allows the user to change the name of an album.

  • GET /editAlbum/:id
  • POST /editAlbum/:id

/albums/:id/addPhoto

This page displays a form for a user to add a photo to an album that they own.

  • GET /albums/:id/addPhoto
  • POST /albums/:id/addPhoto

/ablums/:id/deletePhoto/:photoId

This route will delete a photo from a user's album. As of now, this is planned to cause a page refresh. This may be moved to an API route.

  • DELETE /ablums/:id/deletePhoto/:photoId