delete ingredients not in update request

This commit is contained in:
Thomas Rubini 2023-01-26 21:41:58 +01:00
parent 553776774f
commit 0fd3e0aa15
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373

View File

@ -169,6 +169,11 @@ final class RecipeController
}
}
// delete all remaining ingredients, they have been deleted by the user
foreach($A_ingrsInDB as $O_ingr){
$O_ingr->delete();
}
header("Location: /recipe/view/".$O_recipe->I_ID);
}