From 6c51a14292b28bd637c3c60dace001be5c640257 Mon Sep 17 00:00:00 2001 From: Zanz2 Date: Tue, 11 Sep 2018 13:04:40 +0200 Subject: [PATCH] Fixed oversight, added paging to connections --- app/controllers/api/v1/connections_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/v1/connections_controller.rb b/app/controllers/api/v1/connections_controller.rb index 740593a32..1ce2111f4 100644 --- a/app/controllers/api/v1/connections_controller.rb +++ b/app/controllers/api/v1/connections_controller.rb @@ -10,6 +10,8 @@ module Api before_action :load_connection, only: :show def index + @connections = @connections.page(params.dig(:page, :number)) + .per(params.dig(:page, :size)) render jsonapi: @connections, each_serializer: ConnectionSerializer end