From 34a812abaf034e961f24c5a50a819bf858544011 Mon Sep 17 00:00:00 2001 From: mjms0214 Date: Tue, 22 Aug 2023 23:16:02 +0900 Subject: [PATCH] [feat/#54] Fix: url error --- src/components/NewAssignment.tsx | 2 +- src/props/Lecture.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NewAssignment.tsx b/src/components/NewAssignment.tsx index 598dbed..51a3d4f 100644 --- a/src/components/NewAssignment.tsx +++ b/src/components/NewAssignment.tsx @@ -34,7 +34,7 @@ const newAssignment: FC = () => { const submitData = (data: any) => { let params = { lecture_id: location.state.lecture_id, - user_id: location.state.user_id, + professor_id: location.state.user_id, title: data.title, start_date: startDate, due_date: dueDate, diff --git a/src/props/Lecture.tsx b/src/props/Lecture.tsx index 6711df6..cd74e50 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/student/enroll", params) + .post("http://moaroom-back.duckdns.org:8080/lectures/students/enroll", params) .then(function(response) { console.log(response) if (response.data === "강의 신청 완료") {