feat(tasks): a work request's description is optional
This commit is contained in:
3 files changed
+5
-5
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user