summaryrefslogtreecommitdiff
path: root/internal/api/google_calendar.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-23 08:59:35 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-23 08:59:35 +0000
commit23c670442392af1c75b935b3296ae2fc4fd094ba (patch)
tree3137ff26aa5ed14ff8acb77007d4bc6ec2fff217 /internal/api/google_calendar.go
parent92c784dd057d8f110c677516909162c4cd4d00da (diff)
fix: support multiple enabled Google Task lists and Calendars
- Update Google API interfaces with setters for list/calendar IDs - Update fetchCalendarEvents and fetchGoogleTasks to use enabled IDs from source_configs - Update timeline logic tests to reflect interface changes and seed config data - Ensure dashboard respects user-selected lists from settings
Diffstat (limited to 'internal/api/google_calendar.go')
-rw-r--r--internal/api/google_calendar.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/api/google_calendar.go b/internal/api/google_calendar.go
index 68d423b..8bb3143 100644
--- a/internal/api/google_calendar.go
+++ b/internal/api/google_calendar.go
@@ -176,6 +176,11 @@ func (c *GoogleCalendarClient) GetEventsByDateRange(ctx context.Context, start,
return deduplicateEvents(allEvents), nil
}
+// SetCalendarIDs updates the calendar IDs used by the client
+func (c *GoogleCalendarClient) SetCalendarIDs(ids []string) {
+ c.calendarIDs = ids
+}
+
// GetCalendarList returns all calendars accessible to the user
func (c *GoogleCalendarClient) GetCalendarList(ctx context.Context) ([]models.CalendarInfo, error) {
list, err := c.srv.CalendarList.List().Do()