diff options
author | oliverpool <git@olivier.pfad.fr> | 2024-03-20 17:39:02 +0100 |
---|---|---|
committer | oliverpool <git@olivier.pfad.fr> | 2024-03-23 23:02:06 +0100 |
commit | 33a3ee19553c094ead4c4c5ead2973dee0fc3067 (patch) | |
tree | 2800b6aa383c069066df0bf2430e562a3bcb531d /routers | |
parent | Merge pull request '[port] gitea#29833: Refactor markdown attention render' (... (diff) | |
download | forgejo-33a3ee19553c094ead4c4c5ead2973dee0fc3067.tar.xz forgejo-33a3ee19553c094ead4c4c5ead2973dee0fc3067.zip |
[TESTS] webhook forms creation and edition
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 } |