-
Notifications
You must be signed in to change notification settings - Fork 0
Routes
Josh Earlenbaugh edited this page Nov 19, 2017
·
12 revisions
Here is where a representation of the routes and route-relations lives.
- /login
- /signup
- /feed - question feed/homepage/
- /users/:userId - user profile
- /questions/new - create a new question
- /questions/:questionId - question show
- /questions/:questionId/answers - question answers index
- /questions/:questionId/answers/:answerId - question answer show
- /questions/:questionId/answers/:answerId/comments - question answer comments index
- /questions/:questionId/answers/:answerId/comments/:commentId - question answer comment show
-
users
- GET api/user/:id - returns a user
-
questions
- GET api/questions - returns the question information for the Question Search Feature
- GET api/questions/:id - returns a question
- POST api/questions - creates a question
- PATCH api/questions/:id - edits a question
- DELETE api/questions/:id - deletes a question
-
answers
- GET api/answers - returns the answers for a particular question
- GET api/answers/:id - returns the requested answer to a question
- POST api/answers - creates an answer to a question
- PATCH api/answers/:id - edits an answer to a question
- DELETE api/answers/:id - deletes an answer to a question
-
comments
- GET api/comments - returns the comments to an answer to a question
- POST api/comments - creates a comment to a answer to a question
- PATCH api/comments/:id - edits a comment to an answer to a question
- DELETE api/comments/:id - deletes a comment to an answer to a question