-
Notifications
You must be signed in to change notification settings - Fork 9
Routes
ChrisCavs edited this page Jul 5, 2018
·
6 revisions
-
GET /
StaticPagesController#root
-
GET /api/users
- returns user information for search feature and stories authors -
GET /api/users/:id
- returns user (for profile) -
GET /api/users/:id/feed
- returns stories based on user follows -
POST /api/users
- sign up -
PATCH /api/users/:id
- edits user profile
-
POST /api/session
- log in -
DELETE /api/session
- log out
-
GET /api/stories
- returns relevant stories (filtered bydata
/params
) -
GET /api/stories/:id
- returns story -
GET /api/stories/popular
- returns 5 popular stories, based on karma -
POST /api/stories
- creates a story -
PATCH /api/stories/:id
- edit a story -
DELETE /api/stories/:id
- remove a story
-
GET /api/comments
- returns relevant comments (filtered bydata
/params
) -
GET /api/comments/:id
- returns comment -
POST /api/comments
- creates a comment -
PATCH /api/comments/:id
- edit a comment -
DELETE /api/comments/:id
- remove a comment
-
POST /api/stories/:story_id/likes
- like a story -
DELETE /api/stories/:story_id/likes
- unlike a story -
POST /api/comments/:comment_id/likes
- like a comment -
DELETE /api/comments/:comment_id/likes
- unlike a comment
-
POST /api/users/:user_id/follow
- follow a user -
DELETE /api/users/:user_id/follow
- unfollow a user
-
/
- Homepage -
/feed
- user feed (based on follows) -
/users/:userId
- user profile -
/stories/new
- create a story -
/stories/:storyId
- story show -
/stories/:storyId/edit
- update a story