# frozen_string_literal: true

module ProjectCollectionVulnerabilityFindingsActions
  extend ActiveSupport::Concern
  include ProjectVulnerabilityFindingsActions

  included do
    def history
      history_count = Gitlab::Vulnerabilities::History.new(vulnerable, params: filter_params).findings_counter

      respond_to do |format|
        format.json do
          render json: history_count
        end
      end
    end
  end
end
