Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BramMeir committed Apr 9, 2024
1 parent 9744e68 commit f59658a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion backend/api/tests/test_course.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ def test_create_project_with_zip_file_as_structure(self):
follow=True,
)

# Debugging print statements
self.assertEqual(response.status_code, 200)
self.assertTrue(course.projects.filter(name="become champions").exists())

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/composables/services/courses.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ export function useCourses(): CoursesState {

async function createCourse(courseData: Course): Promise<void> {
const endpoint = endpoints.courses.index;
await create<Response>(
await create<Course>(
endpoint,
{
name: courseData.name,
description: courseData.description,
academic_startyear: courseData.academic_startyear,
faculty: courseData.faculty?.id,
},
response,
Response.fromJSON,
course,
Course.fromJSON,
);
}

Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/courses/CreateCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const submitCourse = async (): Promise<void> => {
}
};
/* Get the current academic year */
const currentAcademicYear = () => {
if (new Date().getMonth() < 9) {
return new Date().getFullYear() - 1;
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/views/projects/CreateProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ const rules = computed(() => {
// Function to handle the file upload of a docker script
const onDockerScriptUpload = (event: any) => {
form.dockerScript = event.files[0];
console.log(form.dockerScript);
};
// Function to handle the file upload of a zip file containing the submission structure
const onZipStructureUpload = (event: any) => {
form.submissionStructure = event.files[0];
console.log(form.submissionStructure);
};
Expand All @@ -77,7 +75,6 @@ const submitProject = async (): Promise<void> => {
// Only submit the form if the validation was successful
if (result) {
// Pass the project data to the service
console.log(form.submissionStructure);
await createProject(
new Project(
'', // ID not needed for creation, will be generated by the backend
Expand Down Expand Up @@ -222,8 +219,8 @@ label {
.grid {
display: grid;
grid-template-columns: 1fr 1fr; /* Two equally sized columns */
gap: 1rem; /* Space between columns */
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
</style>

0 comments on commit f59658a

Please sign in to comment.