feat:#57 fixed bug

This commit is contained in:
Elmar Kresse
2024-10-07 20:50:00 +02:00
parent 8d0657acec
commit 8e9976e607
7 changed files with 717 additions and 17 deletions

View File

@@ -28,6 +28,7 @@ type CourseService interface {
GetAllCourses() []string
GetAllCoursesForSemester(semester string) []model.SeminarGroup
GetAllCoursesForSemesterWithEvents(semester string) ([]string, error)
FindCourseByCourseName(courseName string) (model.SeminarGroup, error)
}
// PocketBaseCourseService is a struct that implements the CourseService interface
@@ -72,3 +73,8 @@ func removeEmptyCourses(courses []string) []string {
}
return filteredCourses
}
// FindCourseByCourseName returns a course by its name
func (s *PocketBaseCourseService) FindCourseByCourseName(courseName string) (model.SeminarGroup, error) {
return db.FindCourseByCourseName(s.app, courseName)
}