Unify active task loading across API handlers

This commit is contained in:
Ian Gulliver
2026-10-20 23:31:16 -07:00
parent 74de15db8e
commit 73689f0f2d
5 changed files with 25 additions and 41 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ const (
)
func (s *Server) GetTaskDir(w http.ResponseWriter, r *http.Request, taskID string, params api.GetTaskDirParams) {
t, _, ok := s.activeTask(w, r, taskID)
t, ok := s.activeTask(w, r, taskID)
if !ok {
return
}
@@ -155,7 +155,7 @@ func dirEntry(root *os.Root, name string, de fs.DirEntry) api.DirEntry {
}
func (s *Server) GetTaskFile(w http.ResponseWriter, r *http.Request, taskID string, params api.GetTaskFileParams) {
t, _, ok := s.activeTask(w, r, taskID)
t, ok := s.activeTask(w, r, taskID)
if !ok {
return
}