mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-03 02:09:15 +02:00
feat:#5 removed unused function
This commit is contained in:
@@ -256,17 +256,6 @@ func GetAllModulesByNameAndDateRange(app *pocketbase.PocketBase, name string, st
|
|||||||
return events, nil
|
return events, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetEventsInTimeRange(app *pocketbase.PocketBase, from time.Time, to time.Time) (model.Events, error) {
|
|
||||||
var events model.Events
|
|
||||||
|
|
||||||
err := app.Dao().DB().Select("*").From("events").Where(dbx.NewExp("Start >= {:startDate} AND End <= {:endDate}", dbx.Params{"startDate": from, "endDate": to})).All(&events)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return events, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetEventsThatCollideWithTimeRange returns all events that collide with the given time range
|
// GetEventsThatCollideWithTimeRange returns all events that collide with the given time range
|
||||||
// we have events with start and end in the database, we want to get all events that collide with the given time range
|
// we have events with start and end in the database, we want to get all events that collide with the given time range
|
||||||
// we have 4 cases:
|
// we have 4 cases:
|
||||||
|
Reference in New Issue
Block a user