diff options
author | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-03-24 06:35:07 +0100 |
---|---|---|
committer | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-03-24 06:35:07 +0100 |
commit | b7c535dba8e236e0bae65bac15034d974035fbd7 (patch) | |
tree | 50b6c1f063f834c36e9ad11bd93a67f740b8b029 /routers | |
parent | Merge pull request '[PORT] Unify search boxes (gitea#29530)' (#2688) from sne... (diff) | |
parent | [TESTS] webhook forms creation and edition (diff) | |
download | forgejo-b7c535dba8e236e0bae65bac15034d974035fbd7.tar.xz forgejo-b7c535dba8e236e0bae65bac15034d974035fbd7.zip |
Merge pull request '[TESTS] webhook forms creation and edition' (#2755) from oliverpool/forgejo:webhook_1_tests into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2755
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/setting/webhook.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/web/repo/setting/webhook.go b/routers/web/repo/setting/webhook.go index 2e703a197a..08e45b5137 100644 --- a/routers/web/repo/setting/webhook.go +++ b/routers/web/repo/setting/webhook.go @@ -214,9 +214,10 @@ func createWebhook(ctx *context.Context, params webhookParams) { return } ctx.Data["BaseLink"] = orCtx.LinkNew + ctx.Data["BaseLinkNew"] = orCtx.LinkNew if ctx.HasError() { - ctx.HTML(http.StatusOK, orCtx.NewTemplate) + ctx.HTML(http.StatusUnprocessableEntity, orCtx.NewTemplate) return } @@ -271,7 +272,7 @@ func editWebhook(ctx *context.Context, params webhookParams) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(http.StatusOK, orCtx.NewTemplate) + ctx.HTML(http.StatusUnprocessableEntity, orCtx.NewTemplate) return } |