ingredients and steps on recipe page
This commit is contained in:
parent
5898ac7779
commit
925135d08c
4 changed files with 43 additions and 12 deletions
|
@ -33,7 +33,7 @@ app.get("/recipe/:id", async (req, res) => {
|
|||
const [recipe, ingredients, steps] = await Promise.all([recipeQuery, ingredientsQuery, stepsQuery]);
|
||||
|
||||
const result = {
|
||||
recipe: recipe[0],
|
||||
details: recipe[0],
|
||||
ingredients: ingredients.map(ingredient => ({
|
||||
name: ingredient.name,
|
||||
quantity: ingredient.quantity,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue