mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
caldav: add path to interface QueryCalendarObjects
This was missing for proper multi-calendar support.
This commit is contained in:
parent
5b5b542f2f
commit
e3ba95cd77
@ -34,7 +34,7 @@ type Backend interface {
|
||||
GetCalendar(ctx context.Context, path string) (*Calendar, error)
|
||||
GetCalendarObject(ctx context.Context, path string, req *CalendarCompRequest) (*CalendarObject, error)
|
||||
ListCalendarObjects(ctx context.Context, path string, req *CalendarCompRequest) ([]CalendarObject, error)
|
||||
QueryCalendarObjects(ctx context.Context, query *CalendarQuery) ([]CalendarObject, error)
|
||||
QueryCalendarObjects(ctx context.Context, path string, query *CalendarQuery) ([]CalendarObject, error)
|
||||
PutCalendarObject(ctx context.Context, path string, calendar *ical.Calendar, opts *PutCalendarObjectOptions) (loc string, err error)
|
||||
DeleteCalendarObject(ctx context.Context, path string) error
|
||||
|
||||
@ -213,7 +213,7 @@ func (h *Handler) handleQuery(r *http.Request, w http.ResponseWriter, query *cal
|
||||
}
|
||||
q.CompFilter = *cf
|
||||
|
||||
cos, err := h.Backend.QueryCalendarObjects(r.Context(), &q)
|
||||
cos, err := h.Backend.QueryCalendarObjects(r.Context(), r.URL.Path, &q)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -226,6 +226,6 @@ func (t testBackend) ListCalendarObjects(ctx context.Context, path string, req *
|
||||
return t.objectMap[path], nil
|
||||
}
|
||||
|
||||
func (t testBackend) QueryCalendarObjects(ctx context.Context, query *CalendarQuery) ([]CalendarObject, error) {
|
||||
func (t testBackend) QueryCalendarObjects(ctx context.Context, path string, query *CalendarQuery) ([]CalendarObject, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user