From 8229109d57ada9059b53b6623f32896cd7ba8cf1 Mon Sep 17 00:00:00 2001 From: hyuna Date: Wed, 3 Jul 2024 16:59:44 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20=EB=AA=85=EC=84=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=97=90=20=EB=94=B0=EB=A5=B8=20api=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/weekendMeal/index.ts | 4 ++-- src/app/components/common/dropdown/state/class/page.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apis/weekendMeal/index.ts b/src/apis/weekendMeal/index.ts index d36da08..8371baa 100644 --- a/src/apis/weekendMeal/index.ts +++ b/src/apis/weekendMeal/index.ts @@ -4,7 +4,7 @@ import { useMutation, useQuery } from "@tanstack/react-query"; interface ChangeStateParams { status: "OK" | "NO"; - userId: string; + id: string; } interface mealcheckProp { @@ -54,7 +54,7 @@ export const ChangeState = () => { mutationFn: async (params) => { try { await instance.patch( - `weekend-meal/status?userId=${params.userId}&status=${params.status}` + `/weekend-meal/status?id=${params.id}&status=${params.status}` ); } catch (error) { handleError(error); diff --git a/src/app/components/common/dropdown/state/class/page.tsx b/src/app/components/common/dropdown/state/class/page.tsx index c6f82bb..75f88b5 100644 --- a/src/app/components/common/dropdown/state/class/page.tsx +++ b/src/app/components/common/dropdown/state/class/page.tsx @@ -17,7 +17,7 @@ const ClassmealDrop = ({ option, id, onclick }: StateDropProps) => { const status = selectedOption === "미신청" ? "NO" : "OK"; try { await ChangeMealMutate( - { status, userId: id || "" }, + { status, id: id || "" }, { onSuccess: () => {}, onError: (error) => {