-
Notifications
You must be signed in to change notification settings - Fork 1
Routes
Andy Wynkoop edited this page Apr 3, 2018
·
4 revisions
- GET
/StaticPagesController#root
- GET
/api/users- get all users (for search) - GET
/api/users/:id- get a single user (profile page) - POST
/api/users- sign up
- POST
/api/session- log in - DELETE
/api/session- log out
- GET
/api/posts- get all posts (for friends of current_user only) - GET
/api/users/:userId/posts- get all posts for a user (profile page) - POST
/api/posts- create a new post - PATCH
/api/posts/:id- edit a post - DELETE
/api/posts/:id- delete a post
- GET
/api/posts/:post_id/comments- get all comments for a post - POST
/api/posts/:post_id/comments- create a comment on a post - PATCH
/api/comments/:id- edit a comment - DELETE
/api/comments/:id
- POST
/api/chats/:userId- create a chat between current_user and target user - GET
/api/chats/:id/messages- get all messages for a chat - POST
/api/chats/:id/messages- send a new message! -
No delete route- messages are permanent so say nice things to each other
-
/- login/Mainpage - handles new user sign up when logged out, renders news feed /MainPage when logged in -
/:userId- user's profile page