feat(tasks): a work request's description is optional

This commit is contained in:
sam committed 2026-10-18 00:24:42 +11:00
1 parent 0f7ca9e483
commit 40b356543a
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -96,8 +96,8 @@ func (s *Server) handleWorkRequest(w http.ResponseWriter, r *http.Request) {
request.Workflow = strings.TrimSpace(request.Workflow)
request.Title = strings.TrimSpace(request.Title)
request.Instructions = strings.TrimSpace(request.Instructions)
if request.Workflow == "" || request.Title == "" || request.Instructions == "" {
http.Error(w, "workflow, title, and instructions are required", http.StatusBadRequest)
if request.Workflow == "" || request.Title == "" {
http.Error(w, "workflow and title are required", http.StatusBadRequest)
return
}
if utf8.RuneCountInString(request.Title) > 80 {