mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-01 01:14:30 +08:00
Set order for inventory and inventory items endpoints (RepositoryRowConnectionController) [SCI-9914] (#6859)
This commit is contained in:
parent
cbe1eef8af
commit
b36354d521
1 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,7 @@ class RepositoryRowConnectionsController < ApplicationController
|
|||
def repositories
|
||||
repositories = Repository.accessible_by_teams(current_team)
|
||||
.search_by_name_and_id(current_user, current_user.teams, params[:query])
|
||||
.order(name: :asc)
|
||||
.page(params[:page] || 1)
|
||||
.per(Constants::SEARCH_LIMIT)
|
||||
render json: {
|
||||
|
@ -110,6 +111,7 @@ class RepositoryRowConnectionsController < ApplicationController
|
|||
def repository_rows
|
||||
repository_rows = @repository.repository_rows
|
||||
.search_by_name_and_id(current_user, current_user.teams, params[:query])
|
||||
.order(name: :asc)
|
||||
.page(params[:page] || 1)
|
||||
.per(Constants::SEARCH_LIMIT)
|
||||
render json: {
|
||||
|
|
Loading…
Add table
Reference in a new issue