fix:#41 added error if html request isn't 200

This commit is contained in:
Elmar Kresse
2024-06-24 10:23:04 +02:00
parent 9f3d2294dd
commit 2ff37ea441
6 changed files with 125 additions and 32 deletions

View File

@@ -122,10 +122,12 @@ func DeleteAllEvents(app *pocketbase.PocketBase) error {
// If the update was not successful, an error is returned
func UpdateModulesForCourse(app *pocketbase.PocketBase, course string) (model.Events, error) {
seminarGroup := v1.GetSeminarGroupEventsFromHTML(course)
seminarGroup, err := v1.GetSeminarGroupEventsFromHTML(course)
if err != nil {
return nil, err
}
seminarGroup = v1.ClearEmptySeminarGroups(seminarGroup)
seminarGroup = v1.ReplaceEmptyEventNames(seminarGroup)
//check if events in the seminarGroups Events are already in the database