fix:#65 fixed fetching and deleting events in front

This commit is contained in:
Elmar Kresse
2024-03-11 03:33:14 +01:00
parent 1f99e26f80
commit 9f316c596a
5 changed files with 42 additions and 28 deletions

View File

@@ -65,7 +65,7 @@ func FetchAndUpdateSportEvents(app *pocketbase.PocketBase) ([]model.Event, error
}
// @TODO: delete and save events in one transaction and it only should delete events that are not in the new events list and save events that are not in the database
err = db.DeleteAllEventsForCourse(app, "Sport", functions.GetCurrentSemesterString())
err = db.DeleteAllEventsByCourse(app, "Sport", functions.GetCurrentSemesterString())
if err != nil {
return nil, err
}