diff --git a/routers/api/v1/admin/hooks.go b/routers/api/v1/admin/hooks.go index 7efff912be5f9..e50c1bc596ed8 100644 --- a/routers/api/v1/admin/hooks.go +++ b/routers/api/v1/admin/hooks.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package org +package admin import ( "net/http" @@ -36,7 +36,7 @@ func ListHooks(ctx *context.APIContext) { // "200": // "$ref": "#/responses/HookList" - sysHooks, err := models.GetSystemWebhooks(utils.GetListOptions(ctx)) + sysHooks, err := models.GetSystemWebhooks() if err != nil { ctx.Error(http.StatusInternalServerError, "GetSystemWebhooks", err) return diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 1076325a91d40..e107d0e552e6f 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1032,7 +1032,7 @@ func Routes() *web.Route { m.Combo("").Get(admin.ListHooks). Post(bind(api.CreateHookOption{}), admin.CreateHook) m.Combo("/{id}").Get(admin.GetHook). - Patch(bind(admin.EditHookOption{}), admin.EditHook). + Patch(bind(api.EditHookOption{}), admin.EditHook). Delete(admin.DeleteHook) }) }, reqToken(), reqSiteAdmin())