diff options
Diffstat (limited to 'lib/api/project_hooks.rb')
-rw-r--r-- | lib/api/project_hooks.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb index e68a3b106b1..bc2d8c816a8 100644 --- a/lib/api/project_hooks.rb +++ b/lib/api/project_hooks.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module API - class ProjectHooks < Grape::API::Instance + class ProjectHooks < ::API::Base include PaginationParams before { authenticate! } @@ -104,7 +104,9 @@ module API delete ":id/hooks/:hook_id" do hook = user_project.hooks.find(params.delete(:hook_id)) - destroy_conditionally!(hook) + destroy_conditionally!(hook) do + WebHooks::DestroyService.new(current_user).execute(hook) + end end end end |