summaryrefslogtreecommitdiff
path: root/lib/api/v3/system_hooks.rb
blob: 391510b9ee0bab9e69959b3647d03b10d9351cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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