Database Schema and Backend Routes - Katherin4u/PinThis GitHub Wiki
Database Schema and Backend Routes
Database Schema
Backend Routes
users
Get /api/users/
- returns the information for the user
GET /api/users/:id
- return the information of one user
sessions
GET /api/auth/
- returns the information for the logged in user
POST /api/auth/signup
- Signs a new user up
POST /api/auth/login
- Logs in a user
DELETE /api/auth/
- Logs out a user
posts
GET /api/posts/
- gets all the posts
POST /api/posts/
- creates a new post
PUT /api/posts/edit
- lets you edit the post
DELETE /api/posts/:id
- deletes the post
Comments
GET /api/comments/
- gets all the comments from a specific post
PUT /api/comments/:id
- lets you edit a commment
DELETE /api/comments/:id
- delete a specific comment by its id