Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Updated frontend course create code #358

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/Courses/AllCoursesTeacher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function AllCoursesTeacher(): JSX.Element {
const [open, setOpen] = useState(false);
const loader = useLoaderData() as {
courses: Course[];
projects: { [courseId: string]: ProjectDetail[] }
projects: { [courseId: string]: ProjectDetail[] };
};
const courses = loader.courses;
const projects = loader.projects;
Expand Down
11 changes: 0 additions & 11 deletions frontend/src/components/Courses/CourseUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,6 @@ export function callToApiToCreateCourse(
})
.then((response) => response.json())
.then((data) => {
//But first also make sure that teacher is in the course admins list
authenticatedFetch(
`${apiHost}/courses/${getIdFromLink(data.url)}/admins`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ admin_uid: loggedInUid() }),
}
);
navigate(getIdFromLink(data.url)); // navigate to data.url
});
}
Expand Down