-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Shihan edited this page Oct 29, 2020
·
2 revisions
* Register -> POST /api/user Send username, password
* Login -> PUT /api/user Send Username, Password
* Clicking on Recipe goes to Recipe page
- Get user's receipes -> GET /api/recipe/:user
- Clicking on Recipe goes to Recipe page
- Form to enter receipes
- Add to database -> POST /api/recipe/:user Send recipe
- Go back to Home Page
* Get receipes from the api -> Food API
* List receipes with Save option
* Click Save to add receipe to database -> POST /api/recipe/:user Send recipe
- POST /api/user -> addUser(username, password)
- PUT /api/user -> getUser(username) then compare
- GET /api/recipe -> getAllRecipes()
- GET /api/receipe/:user -> getUserRecipes(userId)
- POST /api/recipe/:user -> addRecipe(userId, receipe)
- addUser(username, passord) -> SQL
- getUser(username) -> SQL SELECT
- getAllRecipes() -> SQL (LIMIT 10)
- getUserRecipes(userId) -> SQL
- addRecipe(userId, receipe) -> SQL
- login table: id, username, password
- receipe table: receipeId, title, description, userId