From e8c18e5a9400999540494b2a358d182df544cfdb Mon Sep 17 00:00:00 2001 From: Naman Khator Date: Tue, 31 Dec 2024 14:14:31 +0530 Subject: [PATCH] Keep the job_id optional --- cmd/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/http.go b/cmd/http.go index e1d9737..a7d7129 100644 --- a/cmd/http.go +++ b/cmd/http.go @@ -115,7 +115,7 @@ func handlePostJob(w http.ResponseWriter, r *http.Request) { return } - if !reValidateName.Match([]byte(req.JobID)) { + if req.JobID != "" && !reValidateName.Match([]byte(req.JobID)) { sendErrorResponse(w, "invalid characters in the `job_id`", http.StatusBadRequest) return }