-
Notifications
You must be signed in to change notification settings - Fork 1
API Routes
Renerose Dimatulac edited this page Jun 13, 2021
·
3 revisions
- This web app uses the following API routes to dynamically update the page.
- GET /api/users/:id - User Profile
- POST /api/users - Sign Up
- PATCH /api/users/:id - Edit User Profile
- POST /api/session - Log In
- DELETE /api/session - Log Out
- GET /api/posts/ - Fetch all posts
- POST /api/posts/ - Create a post
- PATCH /api/posts/:post_id - Edit a post
- DELETE /api/posts/:post_id - Delete a post
- GET /api/comments/ - Fetch all comments
- POST /api/comments/ - Create a comment
- PATCH /api/comments/:comment_id - Edit a comment
- DELETE /api/comments/:comment_id - Delete a comment
- POST /api/friends - Send a friend request
- DELETE /api/friends/:fr_id - Delete a friend or cancel a friend request
- GET /api/likes - Fetch all likes
- POST /api/posts/:post_id/likes - like a post
- POST /api/comments/:comment_id/likes - like a comment
- DELETE /api/likes/:id - unlike a post or a comment