Skip to content

Commit

Permalink
chore : 명세 수정에 따른 api 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyuna committed Jul 3, 2024
1 parent 20ac07f commit 8229109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/apis/weekendMeal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useMutation, useQuery } from "@tanstack/react-query";

interface ChangeStateParams {
status: "OK" | "NO";
userId: string;
id: string;
}

interface mealcheckProp {
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/common/dropdown/state/class/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 8229109

Please sign in to comment.