{
username: string, *REQUIRED*
email: string, *REQUIRED*
password: string *REQUIRED*
}
Request Type | Endpoint | Description |
---|---|---|
POST | /api/auth/register | Creates User |
POST | /api/auth/login | Creates JWT |
GET | /api/auth/logout | logs out of session |
GET | /api/users | Returns Users |
GET | /api/users/:id | Returns User By ID |
PUT | /api/users/:id | Update User |
DELETE | /api/users/:id | Remove User |
/api/register
- Expects Following Shape
{
username: string, *REQUIRED*
email: string, *REQUIRED*
password: string, *REQUIRED*
}
/api/login
- Expects Following Shape
{
username: string, *REQUIRED*
password: string *REQUIRED*
}
api/users
- Returns All Users In Database
api/users/:id
- Returns User That Matches ID
api/users/:id
-
Updates User Information
-
Expects Following Shape, Only One Field Required
{
username: string, *OPTIONAL*
email: string, *OPTIONAL*
password: string, *OPTIONAL*
}
api/users/:id
- Removes User From Database That Matches ID