diff options
Diffstat (limited to 'internal/handlers/handlers.go')
| -rw-r--r-- | internal/handlers/handlers.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |
