Set order for inventory and inventory items endpoints (RepositoryRowConnectionController) [SCI-9914] (#6859)

This commit is contained in:
wandji 2024-01-03 17:09:37 +01:00 committed by GitHub
parent cbe1eef8af
commit b36354d521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: {