Routes - Shelchamp/RumTumTugger GitHub Wiki
HTML
- GET / StaticPagesController#root
Frontend Routes
- / - stage page
- /login - shows login page
- /signup - shows page to create user
- /feed - user's feed that shows posts
- /users/:userId - user's page
- /feed/new - create post (form will be on the feed)
- /posts/:postId - show a specific post
- /posts/:postId/edit - edit a post (bonus)
Backend Routes
users
- GET /api/users - gets user from search
- POST /api/users - sign up
posts
- GET /api/users/:id/posts - gets all posts from a user
- GET /api/users/:id/posts/:post_id - finds specific post
- POST /api/posts - creates a post
- PATCH /api/posts/:id - edit a post
- DELETE /api/posts/:id - delete a post
likes
- POST /api/posts/:post_id/likes - like a post
- DELETE /api/posts/:post_id/likes - unlike a post
tags
- GET /api/posts/:post_id/tags - finds posts with a specific tag