webhook: fix admin-hooks new dropdowns
This commit is contained in:
parent
c1f7c49804
commit
e0b5f2d59b
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
||||||
"code.gitea.io/gitea/modules/optional"
|
"code.gitea.io/gitea/modules/optional"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/services/context"
|
"code.gitea.io/gitea/services/context"
|
||||||
|
webhook_service "code.gitea.io/gitea/services/webhook"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -38,6 +39,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
|
||||||
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, optional.None[bool]())
|
sys["Webhooks"], err = webhook.GetSystemWebhooks(ctx, optional.None[bool]())
|
||||||
sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
sys["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
||||||
sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
|
sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks"
|
||||||
|
sys["WebhookList"] = webhook_service.List()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ServerError("GetWebhooksAdmin", err)
|
ctx.ServerError("GetWebhooksAdmin", err)
|
||||||
return
|
return
|
||||||
|
@ -48,6 +50,7 @@ func DefaultOrSystemWebhooks(ctx *context.Context) {
|
||||||
def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx)
|
def["Webhooks"], err = webhook.GetDefaultWebhooks(ctx)
|
||||||
def["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
def["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
||||||
def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks"
|
def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks"
|
||||||
|
def["WebhookList"] = webhook_service.List()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ServerError("GetWebhooksAdmin", err)
|
ctx.ServerError("GetWebhooksAdmin", err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue