Database Schema and Backend Routes - MatthewLi154/pinature-capstone-project GitHub Wiki

Database Schema

database schema

Backend Routes

User Profiles

GET /api/users/

  • Returns the information for all users

GET /api/users/:id

  • Returns the information for one user

POST /api/auth/signup

  • Creates a new user with request information

POST /api/auth/login

  • Logs in a user

DELETE /api/auth/

  • Logs out a user

Profiles

PUT /api/profiles/:id

  • Edits the information of signed in user

DELETE /api/profiles/:id

  • Deletes all information of the signed in user and logs them out

Pins

GET /api/pins

  • Returns information of all pins

GET /api/pins/:pinId

  • Returns information of a single pin

POST /api/profile/:profileId/pins

  • Creates a new pin for the signed in user

DELETE /api/pins/:pinsId

  • Deletes a single pin

PUT /api/pins/:pinsId

  • Edits a single pin

Pin Boards

GET /api/profile/:profileId/pins/created

  • Returns information of all the profile's created pins

GET /api/profile/:profileId/pins/saved

  • Returns information of all the profile's saved pins

POST /api/board/:boardId

  • Creates a new pin board

PUT /api/board/:boardId

  • Edits a board created by user

DELETE /api/board/:boardId

  • Deletes a board created by user