File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ func (h *Handlers) CreateJob(ctx *gin.Context) {
8787 return
8888 }
8989
90- if json .Args .TaskID == "" && json .Args .URL == "" {
91- ctx .JSON (http .StatusUnprocessableEntity , gin.H {"errors" : "invalid params: task_id or url is required" })
90+ if json .Args .TaskID == "" && json .Args .URL == "" && json . Args . ContentForCalculatingTaskID == nil {
91+ ctx .JSON (http .StatusUnprocessableEntity , gin.H {"errors" : "invalid params: task_id, content_for_calculating_task_id or url is required" })
9292 return
9393 }
9494
@@ -106,8 +106,8 @@ func (h *Handlers) CreateJob(ctx *gin.Context) {
106106 return
107107 }
108108
109- if json .Args .TaskID == "" && json .Args .URL == "" {
110- ctx .JSON (http .StatusUnprocessableEntity , gin.H {"errors" : "invalid params: task_id or url is required" })
109+ if json .Args .TaskID == "" && json .Args .URL == "" && json . Args . ContentForCalculatingTaskID == nil {
110+ ctx .JSON (http .StatusUnprocessableEntity , gin.H {"errors" : "invalid params: task_id, content_for_calculating_task_id or url is required" })
111111 return
112112 }
113113
You can’t perform that action at this time.
0 commit comments