feat:#65 source code adjusted due to dep changes

This commit is contained in:
Elmar Kresse
2025-04-20 14:13:14 +02:00
parent 629a376176
commit c695eb6a1e
5 changed files with 82 additions and 23 deletions

View File

@@ -82,13 +82,13 @@ 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.DeleteAllEventsByCourse(app.Dao(), "Sport", functions.GetCurrentSemesterString(clock.RealClock{}))
err = db.DeleteAllEventsByCourse(app, "Sport", functions.GetCurrentSemesterString(clock.RealClock{}))
if err != nil {
return nil, err
}
// save events to database
savedEvents, err := db.SaveEvents(events, app.Dao())
savedEvents, err := db.SaveEvents(events, app)
if err != nil {
return nil, err