Sha256: 9d87d58c4139ef365fb89ca0bef090e7fdf1f70f0063e8b92b04be39a7ff35ec

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

module Katello
  class Api::V2::GenericContentUnitsController < Api::V2::ApiController
    Katello::RepositoryTypeManager.generic_content_types(false).each do |type|
      apipie_concern_subst(:a_resource => N_(type), :resource_id => type.pluralize)
      resource_description do
        name type.pluralize.titleize
      end
    end

    include Katello::Concerns::Api::V2::RepositoryContentController

    def default_sort
      %w(name asc)
    end

    def resource_class
      ::Katello::GenericContentUnit.where(content_type: params[:content_type].singularize)
    end

    private

    def repo_association
      :repository_id
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katello-4.3.0.rc2.1 app/controllers/katello/api/v2/generic_content_units_controller.rb
katello-4.3.0.rc2 app/controllers/katello/api/v2/generic_content_units_controller.rb
katello-4.3.0.rc1 app/controllers/katello/api/v2/generic_content_units_controller.rb