diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-03-10 15:28:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 08:28:32 -0600 |
commit | 2173f14708ff3b35d7821fc9b6dcb5fcd06b8494 (patch) | |
tree | 5dcb735cc960095f9f8e114a1d896bb80df66ba9 /routers/api/v1/admin | |
parent | dad057b6393548ad389ead07c2cce5b3ac2811e0 (diff) | |
download | gitea-2173f14708ff3b35d7821fc9b6dcb5fcd06b8494.tar.gz gitea-2173f14708ff3b35d7821fc9b6dcb5fcd06b8494.zip |
Add user webhooks (#21563)
Currently we can add webhooks for organizations but not for users. This
PR adds the latter. You can access it from the current users settings.

Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r-- | routers/api/v1/admin/hooks.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/routers/api/v1/admin/hooks.go b/routers/api/v1/admin/hooks.go index 2aed4139f3..8264503c9d 100644 --- a/routers/api/v1/admin/hooks.go +++ b/routers/api/v1/admin/hooks.go @@ -105,10 +105,7 @@ func CreateHook(ctx *context.APIContext) { // "$ref": "#/responses/Hook" form := web.GetForm(ctx).(*api.CreateHookOption) - // TODO in body params - if !utils.CheckCreateHookOption(ctx, form) { - return - } + utils.AddSystemHook(ctx, form) } |