diff options
| author | Doot Agent <agent@doot.local> | 2026-07-06 00:00:59 +0000 |
|---|---|---|
| committer | Doot Agent <agent@doot.local> | 2026-07-06 00:00:59 +0000 |
| commit | 945c34590677e161a711ccaff0e1077197b1b178 (patch) | |
| tree | df26e8ba5a369b3323649c2fab95bd8e7a49b58e /internal/handlers/settings.go | |
| parent | cd14604bbef17f696475cf8737f1e41c9fa2dd06 (diff) | |
feat: remove Todoist integration entirely
Native tasks (native_tasks table) fully replace Todoist. All Todoist
API code, store functions, handlers, routes, templates, and tests have
been removed. Migration 021 drops the now-unused tasks cache table.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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") |
