From b36354d5212765f45043f01e03ecce69a03508c3 Mon Sep 17 00:00:00 2001 From: wandji Date: Wed, 3 Jan 2024 17:09:37 +0100 Subject: [PATCH] Set order for inventory and inventory items endpoints (RepositoryRowConnectionController) [SCI-9914] (#6859) --- app/controllers/repository_row_connections_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/repository_row_connections_controller.rb b/app/controllers/repository_row_connections_controller.rb index ec3a0f20c..b95d940f2 100644 --- a/app/controllers/repository_row_connections_controller.rb +++ b/app/controllers/repository_row_connections_controller.rb @@ -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: {