-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
lk340 edited this page Jan 20, 2019
·
1 revision
-
GET /StaticPagesController#root
-
GET /api/users- returns the user information of displayed chirps and for the User Search feature -
POST /api/users- sign up
-
POST /api/session- log in -
DELETE /api/session- log out
-
GET /api/posts- returns relevant posts (filtered bydata/params) stored in the back-end database -
GET /api/posts/:id- returns a specific post from the back-end database -
POST /api/posts- persists a new post into the back-end database -
PATCH /api/posts/:id- edit a post and persists new data into the back-end database -
DELETE /api/posts/:id- remove a post from the back-end database
-
POST /api/posts/:post_id/likes- persists's user's liking of a post to back-end to make sure they can't like a post more than once -
DELETE /api/posts/:post_id/likes- removes user's liking of a post from the back-end; allows them to like the photo again
-
GET /api/comments/:id- returns a comment from a post -
POST /api/comments- persists a comment to the back-end database -
PATCH /api/comments/:id- edit a comment and persists new data into the back-end database -
DELETE /api/comments/:id- removes a user's comment on a post from the back-end database