diff options
Diffstat (limited to 'cmd/dashboard')
| -rw-r--r-- | cmd/dashboard/main.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 4112640..1d9e054 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -194,10 +194,20 @@ func main() { r.Post("/auth/deny", h.HandleAgentAuthDeny) }) - // Agent session required for context + // Agent session required for context and write operations r.Group(func(r chi.Router) { r.Use(h.AgentAuthMiddleware) r.Get("/context", h.HandleAgentContext) + + // Write Operations + r.Post("/tasks/{id}/complete", h.HandleAgentTaskComplete) + r.Post("/tasks/{id}/uncomplete", h.HandleAgentTaskUncomplete) + r.Patch("/tasks/{id}/due", h.HandleAgentTaskUpdateDue) + r.Patch("/tasks/{id}", h.HandleAgentTaskUpdate) + + // Create Operations + r.Post("/tasks", h.HandleAgentTaskCreate) + r.Post("/shopping", h.HandleAgentShoppingAdd) }) // HTML endpoints for browser-only agents (GET requests only) @@ -273,6 +283,7 @@ func main() { r.Post("/settings/features", h.HandleCreateFeature) r.Post("/settings/features/toggle", h.HandleToggleFeature) r.Delete("/settings/features/{name}", h.HandleDeleteFeature) + r.Delete("/settings/agents/{id}", h.HandleDeleteAgent) // WebSocket for notifications r.Get("/ws/notifications", h.HandleWebSocket) |
