summaryrefslogtreecommitdiff
path: root/lib/api/v3/system_hooks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/v3/system_hooks.rb')
-rw-r--r--lib/api/v3/system_hooks.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/api/v3/system_hooks.rb b/lib/api/v3/system_hooks.rb
deleted file mode 100644
index 5787c06fc12..00000000000
--- a/lib/api/v3/system_hooks.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-module API
- module V3
- class SystemHooks < Grape::API
- before do
- authenticate!
- authenticated_as_admin!
- end
-
- resource :hooks do
- desc 'Get the list of system hooks' do
- success ::API::Entities::Hook
- end
- get do
- present SystemHook.all, with: ::API::Entities::Hook
- end
-
- desc 'Delete a hook' do
- success ::API::Entities::Hook
- end
- params do
- requires :id, type: Integer, desc: 'The ID of the system hook'
- end
- delete ":id" do
- hook = SystemHook.find_by(id: params[:id])
- not_found!('System hook') unless hook
-
- present hook.destroy, with: ::API::Entities::Hook
- end
- end
- end
- end
-end