-
Notifications
You must be signed in to change notification settings - Fork 0
Routes
Anna Oh edited this page Nov 20, 2017
·
5 revisions
- GET / StaticPagesController#root
- GET /api/users - returns the user information for the User Search feature
- POST /api/users - sign up
- POST /api/session - log in
- DELETE /api/session - log out
- GET /api/photos - returns relevant photo (filtered by data/params)
- GET /api/photos/:id - returns photo
- 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.
- 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
- 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