From 945c34590677e161a711ccaff0e1077197b1b178 Mon Sep 17 00:00:00 2001 From: Doot Agent Date: Mon, 6 Jul 2026 00:00:59 +0000 Subject: 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 --- internal/store/native_tasks.go | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'internal/store/native_tasks.go') diff --git a/internal/store/native_tasks.go b/internal/store/native_tasks.go index ca19377..5758407 100644 --- a/internal/store/native_tasks.go +++ b/internal/store/native_tasks.go @@ -2,7 +2,6 @@ package store import ( "encoding/json" - "log" "time" "task-dashboard/internal/models" @@ -96,26 +95,6 @@ func (s *Store) UncompleteNativeTask(id string) error { return err } -// ImportFromTodoist copies all incomplete tasks from the Todoist cache into native_tasks. -// Skips tasks already present (by ID). Returns the count of newly imported tasks. -func (s *Store) ImportFromTodoist() (int, error) { - result, err := s.db.Exec(` - INSERT OR IGNORE INTO native_tasks - (id, content, description, project_name, due_date, priority, completed, labels, created_at, updated_at) - SELECT - id, content, COALESCE(description, ''), COALESCE(project_name, ''), - due_date, priority, 0, COALESCE(labels, '[]'), created_at, CURRENT_TIMESTAMP - FROM tasks - WHERE completed = 0 - `) - if err != nil { - return 0, err - } - n, _ := result.RowsAffected() - log.Printf("ImportFromTodoist: imported %d tasks", n) - return int(n), nil -} - func scanNativeTasks(rows interface{ Next() bool; Scan(...interface{}) error; Err() error }) ([]models.Task, error) { var tasks []models.Task for rows.Next() { -- cgit v1.2.3