From 7df102cfc608aaaf7ff9301ce76f1effcc570709 Mon Sep 17 00:00:00 2001 From: mjms0214 Date: Sun, 20 Aug 2023 22:08:11 +0900 Subject: [PATCH] [feat/#54] Fix: modify API URL & request param --- src/components/MyPage.tsx | 4 ++-- src/props/Lecture.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/MyPage.tsx b/src/components/MyPage.tsx index b7c9428..7a9dd71 100644 --- a/src/components/MyPage.tsx +++ b/src/components/MyPage.tsx @@ -129,9 +129,9 @@ const MyPage: FC = () => { const createLecture = (data: any) => { let params = { title: data.title, - professorId: user_id, + professor_id: user_id, room: data.room, - roomCount: data.room_count, + room_count: data.room_count, }; console.log(params); diff --git a/src/props/Lecture.tsx b/src/props/Lecture.tsx index cc8c3fd..6711df6 100644 --- a/src/props/Lecture.tsx +++ b/src/props/Lecture.tsx @@ -22,7 +22,7 @@ const Lecture = ({ lecture, isProfessor }: LectureProps) => { console.log(params); axios - .post("http://moaroom-back.duckdns.org:8080/lecture/enroll", params) + .post("http://moaroom-back.duckdns.org:8080/lecture/student/enroll", params) .then(function(response) { console.log(response) if (response.data === "강의 신청 완료") {