Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/system_hooks.rb')
-rw-r--r--lib/api/system_hooks.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb
index c7a460df46a..07552aa18e8 100644
--- a/lib/api/system_hooks.rb
+++ b/lib/api/system_hooks.rb
@@ -63,12 +63,14 @@ module API
params do
requires :id, type: Integer, desc: 'The ID of the system hook'
end
+ # rubocop: disable CodeReuse/ActiveRecord
delete ":id" do
hook = SystemHook.find_by(id: params[:id])
not_found!('System hook') unless hook
destroy_conditionally!(hook)
end
+ # rubocop: enable CodeReuse/ActiveRecord
end
end
end