-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Nathan edited this page Mar 13, 2023
·
6 revisions
This web app uses the following API routes to dynamically update the page to create a single-page-app-like feel for the user for specific features.
-
A user can create an account, login, and logout
POST '/api/auth/signup'
POST '/api/auth/login'
ANY '/api/auth/logout'
-
Users will be able to see other users and their own profile data
GET '/api/users'
GET '/api/users/<userId>'
-
A logged in user can create a post
-
A logged in user can update and delete their own post
-
Users can view posts
-
Users can view a specific user's posts
GET '/api/posts'
GET/POST '/api/users/<userId>/posts'
PUT/PATCH '/api/posts/<postId>'
DELETE '/api/posts/<postId>'
-
A logged in user can like or unlike a post with visible confirmation without causing a refresh/redirect.
POST '/api/posts/<postId>/likes'
DELETE '/api/likes/<likeId>'
-
A logged in user may delete one of their own comments, removing it from the list of visible comments without causing a refresh/redirect.
POST '/api/posts/<postId>/comment'
PUT 'api/posts/<postId>/comment
DELETE '/api/comments/<commentId>'
-
A logged in user can follow and unfollow other users
-
A logged in user can see their followers
POST '/api/users/<userId>/followers'
DELETE '/api/followers/<userId>'