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/:id
GET /api/questions/:id
DELETE /api/questions/:id
PATCH /api/questions/:id
Answers *
- Logged in users should be able to post updates and delete answers without causing a refresh.
POST /api/answers/:id
DELETE /api/answers/:id
PATCH /api/answers/:id
Votes *
- Logged in users should be able to vote on answers without causing a refresh.
POST /api/answers/:id/votes/:id
DELETE /api/answers/:id/votes/:id
Log-in
- Users should be able to log-in and be redirected to their profile page.
GET /api/login
POST /api/login
Sign-up
- Users should be able to sign-up and be redirected to their profile page.
GET /api/signup
POST /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/