summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/config/config.go6
-rw-r--r--internal/handlers/handlers.go4
2 files changed, 5 insertions, 5 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 67658b4..6d2e2ef 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -109,11 +109,7 @@ func Load() (*Config, error) {
// Validate checks that required configuration is present
func (c *Config) Validate() error {
- // Require both Todoist and Trello (primary task management systems)
- if c.TodoistAPIKey == "" {
- return fmt.Errorf("TODOIST_API_KEY is required")
- }
-
+ // Todoist is optional — native task management replaces it when key is absent
if c.TrelloAPIKey == "" {
return fmt.Errorf("TRELLO_API_KEY is required")
}
diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go
index 877293a..5ecaf7c 100644
--- a/internal/handlers/handlers.go
+++ b/internal/handlers/handlers.go
@@ -612,6 +612,10 @@ func (h *Handler) handleAtomToggle(w http.ResponseWriter, r *http.Request, compl
err = h.store.UncompleteNativeTask(id)
}
case "todoist":
+ if h.todoistClient == nil {
+ JSONError(w, http.StatusServiceUnavailable, "Todoist not configured", nil)
+ return
+ }
if complete {
err = h.todoistClient.CompleteTask(ctx, id)
} else {