Backend Routes - ZIP78/instagram-clone- GitHub Wiki
Backend Routes
HTML
GET /
StaticPagesController#root
API Endpoints
users
GET /api/users
- returns the user information
POST /api/users
- sign up
DELETE /api/users/id
- delete account
session
POST /api/session
- log in
DELETE /api/session
- log out
photos
GET /api/photos
- returns all the photos
GET /api/photos/:id
- returns a single photo
POST /api/photos
- posts a photo
PATCH /api/photos/:id
- edit a photo
DELETE /api/photos/:id
- remove a photo
likes
POST /api/photos/:photo_id/likes
- like a photo
DELETE /api/photos/:photo_id/like_id
- unlike a photo
comments
POST /api/photos/:photo_id/comments
- post a comment
PATCH /api/photos/:photo_id/comment_id
- update a comment
DELETE /api/comments/:photo_id/comment_id
- delete a comment
follows
POST /api/users/:user_id
- follow a profile
DELETE /api/users/:user_id
- unfollow a profile