Compare commits

..

9 Commits

Author SHA1 Message Date
bfe9f12802 this is getting messy time for a rethink 2025-08-20 17:49:35 +12:00
600c7b6d25 button colour 2025-08-20 17:49:13 +12:00
38560f744d proxy fwd all request attrs 2025-08-20 17:49:01 +12:00
7c1cee2f3a use minutes for time instead of seconds 2025-08-20 17:48:38 +12:00
cd77cfdf66 i really hate cors 2025-08-20 17:48:26 +12:00
7b98506ad5 var rename 2025-08-20 10:49:42 +12:00
6d708d8fd4 padding changes 2025-08-19 18:54:30 +12:00
b3d36afdc7 Add universal bottom padding 2025-08-19 18:49:17 +12:00
12a02ef1f8 small design changes on /recipe/new 2025-08-19 18:49:04 +12:00

View File

@@ -81,25 +81,17 @@ async function addRecipe() {
console.log(comps.ings) console.log(comps.ings)
const ingredientIDs = await Promise.all( const ingredientIDs = await Promise.all(
comps.ings.map(async it => (await client.pb.collection('ingredients').create(it)).id) // get the id of the returned record comps.ings.map(async it => (await client.pb.collection('ingredients').create({
'quantity': it.quantity,
'name': it.name,
'unit': it.name
})).id) // get the id of the returned record
) )
const stepIDs = await Promise.all( const stepIds = await Promise.all(
comps.stepList.map(async it => (await client.pb.collection('steps').create(it)).id)
) )
const recipe = await client.pb.collection('recipes').create({
name: comps.name,
description: comps.description,
servings: comps.servings,
worktime: comps.worktime,
waittime: comps.waittime,
rating: comps.rating,
ingredients: ingredientIDs,
steps: stepIDs
})
console.log(recipe)
} }
function addIngredient() { function addIngredient() {