@@ -30,12 +30,12 @@ public CourseService(CourseRepository courseRepository, ExerciseRepository exerc
3030 this .solutionRepository = solutionRepository ;
3131 }
3232
33- // public Course createCourse(Course course) {
34- // return courseRepository.save(course);
35- // }
36- // public void deleteCourse(Course course) {
37- // courseRepository.delete(course);
38- // }
33+ public Course createCourse (Course course ) {
34+ return courseRepository .save (course );
35+ }
36+ public void deleteCourse (Course course ) {
37+ courseRepository .delete (course );
38+ }
3939
4040 public Course getCourseByID (int id ) {
4141 return courseRepository .findById (id );
@@ -68,12 +68,12 @@ public void removeStudentsFromCourse(Course course, Set<User> student) {
6868 }
6969
7070
71- // public Exercise createExercise(Exercise exercise) {
72- // return exerciseRepository.save(exercise);
73- // }
74- // public void deleteExercise(Exercise exercise) {
75- // exerciseRepository.delete(exercise);
76- // }
71+ public Exercise createExercise (Exercise exercise ) {
72+ return exerciseRepository .save (exercise );
73+ }
74+ public void deleteExercise (Exercise exercise ) {
75+ exerciseRepository .delete (exercise );
76+ }
7777
7878 public Exercise getExerciseByID (int id ) {
7979 return exerciseRepository .findById (id );
@@ -90,14 +90,14 @@ public Exercise getExerciseByCourse(int course_id, String name) {
9090 }
9191
9292
93- //
94- //
95- // public Solution createSolution(Solution solution) {
96- // return solutionRepository.save(solution);
97- // }
98- // public void deleteSolution(Solution solution) {
99- // solutionRepository.delete(solution);
100- // }
93+
94+
95+ public Solution createSolution (Solution solution ) {
96+ return solutionRepository .save (solution );
97+ }
98+ public void deleteSolution (Solution solution ) {
99+ solutionRepository .delete (solution );
100+ }
101101
102102 public Solution getSolutionByID (int id ) {
103103 return solutionRepository .findById (id );
0 commit comments