mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
changed keywords to be index based.
This commit is contained in:
@@ -227,11 +227,18 @@ export default {
|
||||
|
||||
async autoPlanThread(autoPlan, mealTypeIndex) {
|
||||
let apiClient = new ApiApiFactory()
|
||||
|
||||
let keyword_ids = []
|
||||
for (const index in autoPlan.keywords[mealTypeIndex]){
|
||||
let keyword = autoPlan.keywords[mealTypeIndex][index]
|
||||
keyword_ids.push(keyword.id)
|
||||
}
|
||||
|
||||
let data = {
|
||||
"start_date": moment(autoPlan.startDay).format("YYYY-MM-DD"),
|
||||
"end_date": moment(autoPlan.endDay).format("YYYY-MM-DD"),
|
||||
"meal_type_id": autoPlan.meal_types[mealTypeIndex].id,
|
||||
"keywords": autoPlan.keywords[mealTypeIndex],
|
||||
"keyword_ids": keyword_ids,
|
||||
"servings": autoPlan.servings,
|
||||
"shared": autoPlan.shared,
|
||||
"addshopping": autoPlan.addshopping
|
||||
|
||||
Reference in New Issue
Block a user