diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-06 19:38:17 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-17 09:05:24 +0100 |
commit | ce54a801feb62c768042587685b5848e06f0a6da (patch) | |
tree | 34e686eeabd11ade916fadf5c9c833394567834e /lib/api/v3/system_hooks.rb | |
parent | c70dfbc68614658c98a0f17a01413844a2a98abf (diff) | |
download | gitlab-ce-ce54a801feb62c768042587685b5848e06f0a6da.tar.gz |
Backport API to v3paginate-all-the-things
Diffstat (limited to 'lib/api/v3/system_hooks.rb')
-rw-r--r-- | lib/api/v3/system_hooks.rb | 19 |
1 files changed, 19 insertions, 0 deletions
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 |