Fixed oversight, added paging to connections

This commit is contained in:
Zanz2 2018-09-11 13:04:40 +02:00
parent 43e6524392
commit 6c51a14292

View file

@ -10,6 +10,8 @@ module Api
before_action :load_connection, only: :show before_action :load_connection, only: :show
def index def index
@connections = @connections.page(params.dig(:page, :number))
.per(params.dig(:page, :size))
render jsonapi: @connections, each_serializer: ConnectionSerializer render jsonapi: @connections, each_serializer: ConnectionSerializer
end end