summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/server.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/api/server.go b/internal/api/server.go
index 18c58e9..5b027e4 100644
--- a/internal/api/server.go
+++ b/internal/api/server.go
@@ -66,7 +66,9 @@ func (s *Server) routes() {
s.mux.HandleFunc("POST /api/tasks/{id}/reject", s.handleRejectTask)
s.mux.HandleFunc("GET /api/tasks/{id}/subtasks", s.handleListSubtasks)
s.mux.HandleFunc("GET /api/tasks/{id}/executions", s.handleListExecutions)
+ s.mux.HandleFunc("GET /api/executions", s.handleListRecentExecutions)
s.mux.HandleFunc("GET /api/executions/{id}", s.handleGetExecution)
+ s.mux.HandleFunc("GET /api/executions/{id}/log", s.handleGetExecutionLog)
s.mux.HandleFunc("GET /api/executions/{id}/logs/stream", s.handleStreamLogs)
s.mux.HandleFunc("GET /api/templates", s.handleListTemplates)
s.mux.HandleFunc("POST /api/templates", s.handleCreateTemplate)
@@ -166,7 +168,7 @@ func (s *Server) handleAnswerQuestion(w http.ResponseWriter, r *http.Request) {
ResumeSessionID: latest.SessionID,
ResumeAnswer: input.Answer,
}
- if err := s.pool.SubmitResume(r.Context(), tk, resumeExec); err != nil {
+ if err := s.pool.SubmitResume(context.Background(), tk, resumeExec); err != nil {
writeJSON(w, http.StatusServiceUnavailable, map[string]string{"error": err.Error()})
return
}