Demo Account
username: lambda
password: lambda123
| Action | Method | Route | Required |
|---|---|---|---|
| Register/Create | POST | /api/auth/register |
{username, password, email} |
| Login | POST | /api/auth/login |
{username, password} |
Format To Send To DB - for registering
{
username: "string", required
password: "string", required
email: "string" required
}| Action | Method | Route | Required |
|---|---|---|---|
| Read All Users | GET | /api/users |
n/a |
| Read Selected User | GET | /api/users/:id |
n/a |
| Edit User | PUT | /api/users/:id |
{username, password, email} |
| Delete User | DELETE | /api/users/:id |
n/a |
Format To Send To DB - for updating
{
username: "string", required
password: "string", required
email: "string" required
}| Action | Method | Route | Required |
|---|---|---|---|
| Read All Recipes | GET | /api/recipes |
n/a |
| Read Selected Recipe | GET | /api/recipes/:id |
n/a |
| Read User's Recipes | GET | api/users/:id/recipes |
n/a |
| Create Recipe | POST | /api/recipes |
{user_id, title, ingredients, category, instructions} |
| Update Recipe | PUT | /api/recipes/:id |
{user_id, title, ingredients, category, instructions} |
| Delete Recipe | DELETE | /api/recipes/:id |
n/a |
Format To Send To DB - for creating & updating
{
user_id: "integer", required
title: "string", required
source: "string",
ingredients: ["array"], required
instructions: "string",
category: ["array"], required
photo_src: "string"
}