mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-26 01:46:20 +08:00
Fixed oversight, added paging to connections
This commit is contained in:
parent
43e6524392
commit
6c51a14292
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue