From 2c59dc9484e8e1781782c74181f9574f11b5375f Mon Sep 17 00:00:00 2001 From: "Masaharu.Kato" Date: Tue, 17 Jun 2025 09:42:41 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AC=E3=82=B7=E3=83=94=E3=81=8B=E3=82=89?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=AEAPI=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/services/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/services/api.ts b/frontend/src/services/api.ts index 7a31c9e..f076e74 100644 --- a/frontend/src/services/api.ts +++ b/frontend/src/services/api.ts @@ -132,11 +132,11 @@ export const toBuyApi = { }, - addByRecipe: async (recipeId: number): Promise => { + addByRecipe: async (recipeId: number, servings: number): Promise => { const response = await fetch(`${API_BASE_URL}/api/tobuy/addByRecipe`, { method: 'POST', headers: getHeaders(), - body: JSON.stringify({ recipeId }), + body: JSON.stringify({ recipeId, servings }), }) if (!response.ok) { throw new Error(TOBUY_ERRORS.CREATE_FAILED);