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

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users - returns the user information for the User Search feature
  • 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/:id - returns photo

likes

  • POST /api/photos/:id/likes - like a photo
  • DELETE /api/photos/:id/likes - unlike a photo Note: likes does not include a GET route because we will have these routes render the api/photos/show.json.jbuilder view.

comments

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

following

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

Frontend Routes

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

Clone this wiki locally