[TESTS] webhook forms creation and edition

This commit is contained in:
oliverpool 2024-03-20 17:39:02 +01:00
parent af0bb6e68a
commit 33a3ee1955
3 changed files with 341 additions and 2 deletions

View file

@ -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
}