diff options
Diffstat (limited to 'internal/handlers/settings.go')
| -rw-r--r-- | internal/handlers/settings.go | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/internal/handlers/settings.go b/internal/handlers/settings.go index 32e0215..dc345db 100644 --- a/internal/handlers/settings.go +++ b/internal/handlers/settings.go @@ -34,7 +34,7 @@ func (h *Handler) HandleSettingsPage(w http.ResponseWriter, r *http.Request) { WebAuthnEnabled bool }{ Configs: bySource, - Sources: []string{"trello", "todoist", "gcal", "gtasks"}, + Sources: []string{"trello", "gcal", "gtasks"}, Toggles: toggles, SyncLog: syncLog, Agents: agents, @@ -68,20 +68,6 @@ func (h *Handler) HandleSyncSources(w http.ResponseWriter, r *http.Request) { } } - // Sync Todoist projects from cached tasks (avoids deprecated REST API) - if projects, err := h.store.GetProjectsFromTasks(); err == nil && len(projects) > 0 { - var items []models.SourceConfig - for _, p := range projects { - items = append(items, models.SourceConfig{ - Source: "todoist", - ItemType: "project", - ItemID: p.ID, - ItemName: p.Name, - }) - } - _ = h.store.SyncSourceConfigs("todoist", "project", items) - } - // Sync Google Calendar calendars if h.googleCalendarClient != nil { calendars, err := h.googleCalendarClient.GetCalendarList(ctx) @@ -122,18 +108,13 @@ func (h *Handler) HandleSyncSources(w http.ResponseWriter, r *http.Request) { h.HandleSettingsPage(w, r) } -// HandleClearCache invalidates all caches and clears the Todoist sync token +// HandleClearCache invalidates all caches func (h *Handler) HandleClearCache(w http.ResponseWriter, r *http.Request) { if err := h.store.InvalidateAllCaches(); err != nil { JSONError(w, http.StatusInternalServerError, "Failed to clear cache", err) return } - if err := h.store.ClearSyncToken("todoist"); err != nil { - JSONError(w, http.StatusInternalServerError, "Failed to clear sync token", err) - return - } - _ = h.store.AddSyncLogEntry("cache_clear", "Cache cleared — next load fetches fresh data") syncLog, _ := h.store.GetRecentSyncLog(20) @@ -167,8 +148,6 @@ func (h *Handler) HandleToggleSourceConfig(w http.ResponseWriter, r *http.Reques switch source { case "trello": _ = h.store.InvalidateCache("trello_boards") - case "todoist": - _ = h.store.InvalidateCache("todoist_tasks") } w.Header().Set("Content-Type", "application/json") |
