diff options
Diffstat (limited to 'lib/api/system_hooks.rb')
-rw-r--r-- | lib/api/system_hooks.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb index d8e0a425625..2820d305d0f 100644 --- a/lib/api/system_hooks.rb +++ b/lib/api/system_hooks.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module API - class SystemHooks < Grape::API::Instance + class SystemHooks < ::API::Base include PaginationParams before do @@ -70,7 +70,9 @@ module API hook = SystemHook.find_by(id: params[:id]) not_found!('System hook') unless hook - destroy_conditionally!(hook) + destroy_conditionally!(hook) do + WebHooks::DestroyService.new(current_user).execute(hook) + end end # rubocop: enable CodeReuse/ActiveRecord end |