# frozen_string_literal: true

module VulnerabilityExports
  class ExportDeletionWorker
    include ApplicationWorker

    feature_category :vulnerability_management

    idempotent!

    def perform(_exportable_id = nil, vulnerability_export_id) # rubocop:disable Style/OptionalArguments
      vulnerability_export = Vulnerabilities::Export.find_by_id(vulnerability_export_id)
      vulnerability_export&.destroy!
    end
  end
end
