From 4c18ef4799f07b21591a061d2b8c757a630e238f Mon Sep 17 00:00:00 2001 From: hyuna Date: Tue, 20 Aug 2024 23:26:29 +0900 Subject: [PATCH] =?UTF-8?q?chore=20::=20api=20type=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/outAccept/outAccept.ts | 1 + src/apis/outList/list.ts | 6 ++---- src/apis/type.ts | 2 +- src/app/classChange/page.tsx | 4 ++-- src/app/outAccept/page.tsx | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/apis/outAccept/outAccept.ts b/src/apis/outAccept/outAccept.ts index 2bb84fa..717d218 100644 --- a/src/apis/outAccept/outAccept.ts +++ b/src/apis/outAccept/outAccept.ts @@ -57,6 +57,7 @@ export const useOutAccept = () => { mutationFn: async (param) => { try { const response = await instance.patch(`${param.type}/status`, { + type: param.type, status: param.status, ids: param.ids, }); diff --git a/src/apis/outList/list.ts b/src/apis/outList/list.ts index dcd3838..b5c8e68 100644 --- a/src/apis/outList/list.ts +++ b/src/apis/outList/list.ts @@ -2,12 +2,10 @@ import apiError from "@/hook/apiError"; import { instance } from ".."; import { useMutation, useQueries, useQuery } from "@tanstack/react-query"; -interface UuidProp { - id: string[]; -} interface applicationOK { id: string; username: string; + user_id: string; start_time: string; end_time: string; grade: number; @@ -55,7 +53,7 @@ interface ReturnHomeData { } interface earlyReturnHome { - id: string; + user_id: string; username: string; start_time: string; grade: number; diff --git a/src/apis/type.ts b/src/apis/type.ts index 9895c10..32f24f8 100644 --- a/src/apis/type.ts +++ b/src/apis/type.ts @@ -70,7 +70,7 @@ export interface changeClass { } export interface FloorClass { - id: string; + user_id: string; class_num: number; classroom_name: string; end_period: number; diff --git a/src/app/classChange/page.tsx b/src/app/classChange/page.tsx index 5309b50..c8fad11 100644 --- a/src/app/classChange/page.tsx +++ b/src/app/classChange/page.tsx @@ -12,7 +12,7 @@ import Modal from "../components/common/modal/page"; import useAcceptListSelection from "@/hook/hook"; interface FloorClass { - id: string; + user_id: string; class_num: number; classroom_name: string; end_period: number; @@ -154,7 +154,7 @@ const ClassChange = () => { handleAcceptListClick(item.id, item.username)} + onClick={() => handleAcceptListClick(item.user_id, item.username)} prevClass={item.move} nextClass={`${item.classroom_name}`} student={getStudentString(item)} diff --git a/src/app/outAccept/page.tsx b/src/app/outAccept/page.tsx index 7193ff3..35ca725 100644 --- a/src/app/outAccept/page.tsx +++ b/src/app/outAccept/page.tsx @@ -261,7 +261,7 @@ const OutAccept = () => { {data.map((dataItem, index) => ( - handleAcceptListClick(dataItem.id, dataItem.username) + handleAcceptListClick(dataItem.user_id, dataItem.username) } key={index} time={`${dataItem.start_time} ~`}