-
Notifications
You must be signed in to change notification settings - Fork 0
API Routes
Alejandro Carrizosa Grant edited this page Jan 4, 2022
·
1 revision
This web app uses the following API routes that will be handled by the backend flask server and its interaction with the database
- A logged in user can add a new post
POST api/posts
- A logged in user can edit a post's description
PATCH api/posts/<int:postId>
- A logged in user can delete a post
DELETE api/posts/<int:postId>
- A logged in user can like a post
POST api/likes
- A logged in user can unlike a post
DELETE api/likes/<int:likeId>
- A logged in user can comment on a post
POST api/comments
- A logged in user can edit a comment's description on a post
PATCH api/comments/<int:commentId>
- A logged in user can delete a comment
DELETE api/posts/<int:commentId>
- A non-logged in user can sign up to create an account
POST api/auth/signup
- A non-logged in user can login to a pre-existing account
POST api/auth/login
- A logged in user can logout of their account
GET api/auth/logout
- A logged in user can be authenticated
GET api/auth
- A user that fails to login will receive an Unauthorized error message
GET api/auth/unauthorized
- A user can follow another user
POST api/follows
- A user can unfollow another user
DELETE api/follows/<int:followId>