Skip to content
Anna Oh edited this page Nov 21, 2017 · 5 revisions

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • POST /api/users - sign up

session

  • POST /api/session - log in
  • DELETE /api/session - log out

photos

  • GET /api/photos - returns relevant photo (filtered by data/params)
  • GET /api/photos/:photoId - returns photo

likes

  • POST /api/likes - like a photo
  • DELETE /api/likes/:likeId - unlike a photo

comments

  • GET /api/comments - display all comments for a photo
  • POST /api/comments - write a comment for a photo
  • PATCH /api/comments/:commentId - edit comment for a photo
  • DELETE /api/comments/:commentId - delete comment for a photo

following

  • POST /api/following - current user is now following other user
  • DELETE /api/following/:followingId - current user is now not following other user

Frontend Routes

/login
/signup
/main - homepage, index of photos
/photos/:photoId - photo show
/users/:userId - user profile

Clone this wiki locally