gitlab-org--gitlab-foss/app/services/projects/prometheus/alerts/alert_params.rb

17 lines
338 B
Ruby

# frozen_string_literal: true
module Projects
module Prometheus
module Alerts
module AlertParams
def alert_params
return params if params[:operator].blank?
params.merge(
operator: PrometheusAlert.operator_to_enum(params[:operator])
)
end
end
end
end
end