Database Schema and Backend Routes - chrisoney/mercenary-review GitHub Wiki

Database Schema and Backend Routes

Database Schema

Database Schema

Backend Routes

Users

GET /api/users/

  • Returns the information for all users

GET /api/users/:id

  • Returns the information for 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

Systems

GET /api/systems/

  • Returns the information for all systems

POST /api/systems/

  • Creates a new system

GET /api/systems/:id

  • Returns the information for one system

DELETE /api/systems/:id

  • Deletes a system

Characters

GET /api/characters/

  • Returns the information for all characters

POST /api/characters/

  • Creates a new character

GET /api/characters/:id

  • Returns the information for one character

PUT /api/characters/:id

  • Edits the information for one character

DELETE /api/characters/:id

  • Deletes a character

POST /api/characters/:id/comments/

  • Creates a new comment for a specific character

Comments

PUT /api/comments/:id

  • Edits a comment

DELETE /api/comments/:id

  • Deletes a comment

Images

POST /api/images/

  • Creates a new image

DELETE /api/images/:id

  • Deletes an image