# frozen_string_literal: true

module VulnerabilityFindingsHistory
  extend ActiveSupport::Concern

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

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