From 2c1f7a1d6ccb720bb9d058520366fe67c552dd42 Mon Sep 17 00:00:00 2001 From: Remora Date: Mon, 9 Feb 2026 15:57:59 +0100 Subject: [PATCH] Fix: Use /api/v1/inbox endpoint (POST content field) instead of /task --- lib/process-todo.sh | 10 +++++----- scripts/quick-add.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/process-todo.sh b/lib/process-todo.sh index 812c3e3..d4b24b3 100644 --- a/lib/process-todo.sh +++ b/lib/process-todo.sh @@ -22,7 +22,7 @@ if [ "$dry_run" == "true" ]; then exit 0 fi -# Add to Tududi +# Add to Tududi inbox API_URL="${TUDUDI_API_URL:-https://todo.dilain.com/api/v1}" API_KEY="${TUDUDI_API_KEY:-}" @@ -34,15 +34,15 @@ fi response=$(curl -s -X POST \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ - -d "{\"name\":\"$task_name\"}" \ - "$API_URL/task") + -d "{\"content\":\"$task_name\"}" \ + "$API_URL/inbox") task_uid=$(echo "$response" | jq -r '.uid // empty' 2>/dev/null) || task_uid="" if [ -n "$task_uid" ]; then - echo "✅ Added to Tududi: $task_name" + echo "✅ Added to Tududi inbox: $task_name" exit 0 else - echo "⚠️ Failed to add task: $task_name" + echo "⚠️ Failed to add to inbox: $task_name" exit 1 fi diff --git a/scripts/quick-add.sh b/scripts/quick-add.sh index ce5eccf..2d41165 100755 --- a/scripts/quick-add.sh +++ b/scripts/quick-add.sh @@ -19,12 +19,12 @@ if [ -z "$API_KEY" ]; then exit 1 fi -# Create task via POST /api/v1/task (singular endpoint) +# Add to inbox via POST /api/v1/inbox (preferred for quick capture) response=$(curl -s -X POST \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ - -d "{\"name\":\"$task_name\"}" \ - "$API_URL/task") + -d "{\"content\":\"$task_name\"}" \ + "$API_URL/inbox") task_uid=$(echo "$response" | jq -r '.uid // empty')