summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/server.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/api/server.go b/internal/api/server.go
index 604f354..e7756d1 100644
--- a/internal/api/server.go
+++ b/internal/api/server.go
@@ -697,6 +697,9 @@ func (s *Server) handleAcceptTask(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusInternalServerError, map[string]string{"error": err.Error()})
return
}
+ if t.StoryID != "" {
+ go s.pool.CheckStoryCompletion(r.Context(), t.StoryID)
+ }
writeJSON(w, http.StatusOK, map[string]string{"message": "task accepted", "task_id": id})
}