1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-15 16:19:04 -05:00

Merge pull request '[v8.0/forgejo] [API] Add error messages to dispatch API' (#4770) from bp-v8.0/forgejo-db78a3a into v8.0/forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4770
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-08-01 09:52:39 +00:00
commit 7e85d5b6d9

View file

@ -621,10 +621,10 @@ func DispatchWorkflow(ctx *context.APIContext) {
name := ctx.Params("workflowname") name := ctx.Params("workflowname")
if len(opt.Ref) == 0 { if len(opt.Ref) == 0 {
ctx.Error(http.StatusBadRequest, "ref", nil) ctx.Error(http.StatusBadRequest, "ref", "ref is empty")
return return
} else if len(name) == 0 { } else if len(name) == 0 {
ctx.Error(http.StatusBadRequest, "workflowname", nil) ctx.Error(http.StatusBadRequest, "workflowname", "workflow name is empty")
return return
} }