Back End Routes - nohani/Thought-Bubble GitHub Wiki

HTML

* GET / StaticPagesController#root

API Endpoints

users

* POST /api/users - user sign up

session

* POST /api/session - login
* DELETE /api/session - logout

posts

* GET api/posts - returns all posts
* GET api/posts/:id - returns specific post
* POST api/posts - persists new post to back-end database
* PATCH api/posts/:id - updates a post and persists new data to back-end database
* DELETE api/posts/:id - removes a post from the back-end database

follows

* POST api/users/:userid/follows - for users to follow another user
* DELETE api/users/:userid/follows / - for users to unfollow another user
* GET api/follows/ - for a user to see who they follow/who follows them

likes

* POST api/posts/:postid/likes - to like a post
* DELETE api/posts/:postid/likes/- to unlike a post