API Documentation - lucianjones/Team-Tianwen GitHub Wiki
API-Routes
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.
Questions
- Logged in users should be able to post updates and delete questions without causing a refresh.
POST /api/questions/:idGET /api/questions/:idDELETE /api/questions/:idPATCH /api/questions/:id
Answers *
- Logged in users should be able to post updates and delete answers without causing a refresh.
POST /api/answers/:idDELETE /api/answers/:idPATCH /api/answers/:id
Votes *
- Logged in users should be able to vote on answers without causing a refresh.
POST /api/answers/:id/votes/:idDELETE /api/answers/:id/votes/:id
Log-in
- Users should be able to log-in and be redirected to their profile page.
GET /api/loginPOST /api/login
Sign-up
- Users should be able to sign-up and be redirected to their profile page.
GET /api/signupPOST /api/signup
Home
- Users should be able to visit the home page and view questions.
GET /api/
Profile
- Users should be able to visit their profile and make changes.
GET /api/profile/POST /api/profile/PATCH /api/profile/DELETE /api/profile/