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/store/native_tasks.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/store/native_tasks.go')
| -rw-r--r-- | internal/store/native_tasks.go | 21 |
1 files changed, 0 insertions, 21 deletions
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() { |
