Skip to content

Database Schema

Alex Hertel edited this page Jul 28, 2021 · 5 revisions

Database Schema Diagram

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


Medications List & Log

GET /api/user/:user_id/medications/active Returns list of all the user's current medications

GET /api/user/:user_id/medications/log Returns the log of medications the user took on time

POST /api/user/:user_id/medications/new Adds a new medication to the list of current user's current medications

POST /api/user/:user_id/medications/:med_id/log Adds a medication marked as "taken" to the log of the current user's medication log

PATCH /api/user/:user_id/medications/:med_id/update Edits details about a user's particular medication

DELETE /api/user/:user_id/medications/:med_id/delete Deletes a single medication from the user's list of current/active medications


To-Do List

GET /api/user/tasks/active Returns all active tasks in user's To-Do list

GET /api/user/tasks/active/:task_id Returns a single active task-item

GET /api/user/tasks/completed Returns all completed tasks in user's To-Do list

GET /api/user/tasks/completed/:task_id Returns a single completed task-item

POST /api/user/tasks/active/new Adds a new task-item to user's To-Do list

POST /api/user/tasks/completed/new Adds a new task-item to user's To-Do list

PATCH /api/user/tasks/active/:task_id/edit Edits a single task-item

DELETE /api/user/tasks/:task_id/delete Deletes a single comment

Clone this wiki locally