1
0
Fork 0
forked from forgejo/forgejo

webhook: add admin-hooks tests

(cherry picked from commit 9a94019db4)
This commit is contained in:
oliverpool 2024-04-09 11:59:10 +02:00 committed by GitHub
parent 660e450e6d
commit 01dc275a19
5 changed files with 40 additions and 20 deletions

View file

@ -8,7 +8,6 @@ import (
"net/http"
"code.gitea.io/gitea/models/webhook"
"code.gitea.io/gitea/modules/optional"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
@ -38,7 +37,7 @@ func ListHooks(ctx *context.APIContext) {
// "200":
// "$ref": "#/responses/HookList"
sysHooks, err := webhook.GetSystemWebhooks(ctx, optional.None[bool]())
sysHooks, err := webhook.GetSystemWebhooks(ctx, false)
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetSystemWebhooks", err)
return