Commit 46013188 authored by Anshul Riyal's avatar Anshul Riyal

Ascending ordering the package file API

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/81426
parent 3dc4fec0
......@@ -49,6 +49,7 @@ class Packages::PackageFile < ApplicationRecord
scope :preload_conan_file_metadata, -> { preload(:conan_file_metadatum) }
scope :preload_debian_file_metadata, -> { preload(:debian_file_metadatum) }
scope :preload_helm_file_metadata, -> { preload(:helm_file_metadatum) }
scope :order_id_asc, -> { order(id: :asc) }
scope :for_rubygem_with_file_name, ->(project, file_name) do
joins(:package).merge(project.packages.rubygems).with_file_name(file_name)
......
......@@ -29,7 +29,7 @@ module API
.new(user_project, params[:package_id]).execute
package_files = package.installable_package_files
.preload_pipelines
.preload_pipelines.order_id_asc
present paginate(package_files), with: ::API::Entities::PackageFile
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment