backend routes - adammoftah/Stack-Overwhelm GitHub Wiki
GET / StaticPagesController#root
-
GET /api/users
- returns user information comprising questions asked, questions answered, and for the user search functionality -
POST /api/users
- sign up a new user
-
POST /api/session
- sign in a user -
DELETE /api/session
- sign out a user
-
GET /api/questions
- returns questions filtered by data or params -
GET /api/questions/:id
- returns a question with a given ID -
POST /api/questions
- creates a question -
PATCH /api/questions/:id
- edits a question -
DELETE /api/questions/:id
- removes a question
-
GET /api/questions/answers
- returns all answers to a specified question -
GET /api/answers/:id
- returns a specific answer to a question -
POST /api/answers
- creates an answer -
PATCH /api/answers/:id
- edits an answer -
DELETE /api/answers/:id
- removes an answer
-
POST /api/questions/:question_id/favorites
- favorite a question -
DELETE /api/questions/:question_id/favorites
- remove favorite of a question
-
POST /api/answers/:answer_id/votes
- submit either an upvote or downvote -
DELETE /api/answers/:answer_id/votes
- remove either an upvote or downvote
• GET /api/search
- returns questions that relate to a search query