Return DispathWorkflowRun if the input parameter return_run_info was set to true.

This commit is contained in:
markturney 2025-03-12 11:40:36 +00:00
parent 26c139fa86
commit e2db73570b

View file

@ -689,5 +689,9 @@ func DispatchWorkflow(ctx *context.APIContext) {
Jobs: jobs,
}
ctx.JSON(http.StatusCreated, workflowRun)
if opt.ReturnRunInfo {
ctx.JSON(http.StatusCreated, workflowRun)
} else {
ctx.JSON(http.StatusNoContent, nil)
}
}