Backend Routes - KevLin2358/Slickr GitHub Wiki
HTML
GET / StaticPagesController#root
API Endpoints
users
GET/api/users
- users home page with albums and uploaded images
POST/api/users
- sign up
session
POST/api/session
- log in
DELETE/api/session
- log out
photos
GET/api/photos
- returns all photos
GET/api/photos/:id
- returns a photo
GET/api/photos/:search
- returns all photos with the same search
POST/api/photos
- add a photo
PATCH/api/photos/:id
- edit a photos title and descriptions
DELETE/api/photos/:id
- delete a photo
albums
GET/api/albums
- return all albums
GET/api/albums/:id
- returns an albums
POST/api/albums
- add album
PATCH/api/albums/:id
- edit album
DELETE/api/albums/:id
- delete album
comments
POST/api/photos/:id/comments
- make a comment on photo
PATCH/api/photos/:id/comments
- edit comment on photo
DELETE/api/photos/:id/comments
- delete a comment on a photo
tags
POST/api/photos/:id/tags
- add a tag
DELETE/api/photos/:id/tags
- delete a tag
followers
POST/api/users/:id/follower
- follow a person
DELETE/api/users/:id/follower
- unfollow a person
likes
POST/api/photos/:id/liker
- like a photo
DELETE/api/photos/:id/liker
- unlike a photo