Sha256: 7f9b0d713cb776c748fc3c8a232fc94348b342e8346ff1c48287c0a8220e9270

Contents?: true

Size: 303 Bytes

Versions: 25

Compression:

Stored size: 303 Bytes

Contents

module InsightsCloud
  class HitsController < ::ApplicationController
    def index
      host = Host.where(id: host_id_param).first

      render json: {
        hits: host.insights.hits,
      }, status: :ok
    end

    private

    def host_id_param
      params.require(:host_id)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.18 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.18 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.17 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.17 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.16 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.16 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.15 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.15 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-3.0.14 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.14 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.14 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-0.9.14 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-0.9.13.1 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.13.1 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.13.1 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-0.9.13 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-1.0.13 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-2.0.13 app/controllers/insights_cloud/hits_controller.rb
foreman_rh_cloud-0.9.12 app/controllers/insights_cloud/hits_controller.rb