diff --git a/frontend/src/services/api.ts b/frontend/src/services/api.ts index e6f0442..8aacbc6 100644 --- a/frontend/src/services/api.ts +++ b/frontend/src/services/api.ts @@ -132,11 +132,11 @@ export const toBuyApi = { }, - addByRecipe: async (recipeId: number, servings: number): Promise => { + addByRecipe: async (recipeId: number, servings: number, difference: boolean): Promise => { const response = await fetch(`${API_BASE_URL}/api/tobuy/addByRecipe`, { method: 'POST', headers: getHeaders(), - body: JSON.stringify({ recipeId, servings }), + body: JSON.stringify({ recipeId, servings, difference }), }) if (!response.ok) { throw new Error(TOBUY_ERRORS.CREATE_FAILED);