summaryrefslogtreecommitdiff
path: root/internal/handlers
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-15 23:42:29 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-16 02:54:17 +0000
commit31d8d9b32a3ac68d3d939bd080eeb780c37f17d7 (patch)
tree7c2400b13c71606d7d8ee9313a82f7a6e6711cfe /internal/handlers
parent959214426fef103b8baae7bd949adb1f0216ee06 (diff)
fix(agent): pass project_id through on Agent API task creation
HandleAgentTaskCreate decoded project_id from the request but never forwarded it to CreateNativeTask, so a task created via the external Agent API with a project assigned would silently create the task unassigned instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTUSAEKfsPc6WGDq45yPHD
Diffstat (limited to 'internal/handlers')
-rw-r--r--internal/handlers/agent.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/handlers/agent.go b/internal/handlers/agent.go
index cf1eaa1..151520b 100644
--- a/internal/handlers/agent.go
+++ b/internal/handlers/agent.go
@@ -592,10 +592,11 @@ func (h *Handler) HandleAgentTaskCreate(w http.ResponseWriter, r *http.Request)
priority = 1
}
task := models.Task{
- ID: newID(),
- Content: req.Title,
- DueDate: req.DueDate,
- Priority: priority,
+ ID: newID(),
+ Content: req.Title,
+ DueDate: req.DueDate,
+ Priority: priority,
+ ProjectID: req.ProjectID,
}
err = h.store.CreateNativeTask(task)
case "trello":