mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 03:36:44 +08:00
fixed oversight, added paging to connections
This commit is contained in:
parent
34f408b552
commit
4c2c92445c
1 changed files with 2 additions and 0 deletions
|
@ -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