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) => {