fix: Bulk Update Owner Removes Some Recipe Data (#4393)

This commit is contained in:
Michael Genson
2024-10-19 15:36:34 -05:00
committed by GitHub
parent a17529bd71
commit 543a53cab4
4 changed files with 37 additions and 3 deletions

View File

@@ -182,6 +182,10 @@ export class RecipeAPI extends BaseCRUDAPI<CreateRecipe, Recipe, Recipe> {
return await this.requests.put<Recipe[]>(routes.recipesBase, payload);
}
async patchMany(payload: Recipe[]) {
return await this.requests.patch<Recipe[]>(routes.recipesBase, payload);
}
async updateLastMade(recipeSlug: string, timestamp: string) {
return await this.requests.patch<Recipe, RecipeLastMade>(routes.recipesSlugLastMade(recipeSlug), { timestamp })
}

View File

@@ -377,7 +377,7 @@ export default defineComponent({
});
loading.value = true;
await api.recipes.updateMany(selected.value);
await api.recipes.patchMany(selected.value);
await refreshRecipes();
resetAll();