-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Kevin Le edited this page Mar 24, 2022
·
17 revisions
Backend Routes
-
GET /-StaticPagesController#root
-
GET /api/users- returns all users information -
GET /api/users/:id- returns information for a specific user -
POST /api/users- signup -
PATCH /api/users/:id- edit information for a specific user (only if the user is the current user)
-
POST /api/session- login -
DELETE /api/session- logout
-
GET /api/questions- display page of all questions -
GET /api/questions/:question_id- display page of one specific question -
POST /api/questions- user will create(ask) a question -
PATCH /api/questions/:question_id- edit question text (only if the current user is the asker) -
DELETE /api/questions/:question_id- delete question (only if the current user is the asker)
-
GET /api/questions/:question_id/answers- display answers for a given question -
POST /api/answers- user will create an answer (answer a question) -
PATCH /api/answers/:id- edit answer text (only if the current user is the answerer) -
DELETE /api/questions/:id- delete answer (only if the current user is the answerer)
-
POST /api/votes- upvote or downvote a question -
DELETE /api/votes/:id- undo upvote/downvote