Skip to content

Commit

Permalink
Refs #38127 - Add sort options to host bootc_images endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed Jan 15, 2025
1 parent 2053361 commit a0ca87f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ def bootc_images
bootc_image_map = bootc_host_image_map
paged_images = bootc_image_map.to_a.paginate(page: page, per_page: per_page)
results = paged_images.collect { |image| { bootc_booted_image: image[0], digests: image[1] } }
render json: { total: bootc_image_map.size, page: page, per_page: per_page, subtotal: bootc_image_map.size, results: results}
render json: {
total: bootc_image_map.size,
page: page,
per_page: per_page,
subtotal: bootc_image_map.size,
sort: { by: params[:sort_by], order: params[:sort_order], },

Check failure on line 31 in app/controllers/katello/api/v2/host_bootc_images_controller.rb

View workflow job for this annotation

GitHub Actions / Rubocop / Rubocop

Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash, unless each item is on its own line.
results: results,
}
end

private
Expand Down

0 comments on commit a0ca87f

Please sign in to comment.