From ce54a801feb62c768042587685b5848e06f0a6da Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 6 Feb 2017 19:38:17 +0100 Subject: Backport API to v3 --- lib/api/v3/system_hooks.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/api/v3/system_hooks.rb (limited to 'lib/api/v3/system_hooks.rb') diff --git a/lib/api/v3/system_hooks.rb b/lib/api/v3/system_hooks.rb new file mode 100644 index 00000000000..391510b9ee0 --- /dev/null +++ b/lib/api/v3/system_hooks.rb @@ -0,0 +1,19 @@ +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 + end + end + end +end -- cgit v1.2.1