diff options
Diffstat (limited to 'lib/api/system_hooks.rb')
-rw-r--r-- | lib/api/system_hooks.rb | 2 |
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 |