diff options
Diffstat (limited to 'lib/api/system_hooks.rb')
| -rw-r--r-- | lib/api/system_hooks.rb | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb index 708ec8cfe70..d038a3fa828 100644 --- a/lib/api/system_hooks.rb +++ b/lib/api/system_hooks.rb @@ -1,6 +1,7 @@  module API -  # Hooks API    class SystemHooks < Grape::API +    include PaginationParams +      before do        authenticate!        authenticated_as_admin! @@ -10,10 +11,11 @@ module API        desc 'Get the list of system hooks' do          success Entities::Hook        end +      params do +        use :pagination +      end        get do -        hooks = SystemHook.all - -        present hooks, with: Entities::Hook +        present paginate(SystemHook.all), with: Entities::Hook        end        desc 'Create a new system hook' do  | 
