The following endpoints are available to test the functionality of the model methods.
-
GET /api/admin/- gets master list of tasks -
GET /api/admin/:id- gets a single task -
GET /api/volunteer/- gets list of tasks -
GET /api/volunteer/:id- gets a single task -
GET /api/student/- gets list of volunteer cards -
GET /api/student/:id- gets a single volunteer card -
POST /api/admin- adds a new task -
PUT /api/admin:id- updates a given task -
POST /api/volunteer- adds a new volunteer card -
PUT /api/volunteer:id- updates a volunteer card -
POST /api/register- registers a new user -
POST /api/login- logs in a user -
DELETE /api/admin:id- deletes a task -
DELETE /api/volunteer:id- deletes a volunteer card
| field | data type | metadata |
|---|---|---|
| id | unsigned integer | primary key, auto-increments, generated by database |
| full_name | string | required |
| username | string | required |
| password | string | required |
| role | string | required either "Administrator", "Student", or "Volunteer" |
| string | required | |
| phone | integer | required (10 digits) |
Registrants register in the database conform to the following object structure:
{
full_name: "Maggie Price", // String, required
username: 'maggie', // String, required
password: "test", // String, required
role: 'Administrator', // String, required
email: "123a@a.com", // String, required
phone: '3335551234', // Integer, required
}| field | data type | metadata |
|---|---|---|
| id | unsigned integer | primary key, auto-increments, generated by database |
| username | string | required |
| password | string | required |
Registrants login in the database conform to the following object structure:
{
username: 'maggie', // String, required
password: "test", // String, required
}| field | data type | metadata |
|---|---|---|
| id | unsigned integer | primary key, auto-increments, generated by database |
| name | string | required |
| description | string | required |
Admins create tasks in the database conform to the following object structure:
{
name: "Create Algebra 2 Tutoring Session", // String, required
description: 'Class should be 2 hours long and cover variables', // String, required
}| field | data type | metadata |
|---|---|---|
| id | unsigned integer | primary key, auto-increments, generated by database |
| name | string | required |
| location | string | required |
| subject | string | required |
| time | string | required |
Volunteers create trainings/cards in the database conform to the following object structure:
{
name: "Algebra 2 Tutoring Session", // String, required
location: 'Dallas, TX', // String, required
subject: 'Math', // String, required
time: '7-9pm', // String, required
}