mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 20:05:55 +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
|
def repositories
|
||||||
repositories = Repository.accessible_by_teams(current_team)
|
repositories = Repository.accessible_by_teams(current_team)
|
||||||
.search_by_name_and_id(current_user, current_user.teams, params[:query])
|
.search_by_name_and_id(current_user, current_user.teams, params[:query])
|
||||||
|
.order(name: :asc)
|
||||||
.page(params[:page] || 1)
|
.page(params[:page] || 1)
|
||||||
.per(Constants::SEARCH_LIMIT)
|
.per(Constants::SEARCH_LIMIT)
|
||||||
render json: {
|
render json: {
|
||||||
|
@ -110,6 +111,7 @@ class RepositoryRowConnectionsController < ApplicationController
|
||||||
def repository_rows
|
def repository_rows
|
||||||
repository_rows = @repository.repository_rows
|
repository_rows = @repository.repository_rows
|
||||||
.search_by_name_and_id(current_user, current_user.teams, params[:query])
|
.search_by_name_and_id(current_user, current_user.teams, params[:query])
|
||||||
|
.order(name: :asc)
|
||||||
.page(params[:page] || 1)
|
.page(params[:page] || 1)
|
||||||
.per(Constants::SEARCH_LIMIT)
|
.per(Constants::SEARCH_LIMIT)
|
||||||
render json: {
|
render json: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue