summaryrefslogtreecommitdiff
path: root/app/mailers/emails/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/emails/projects.rb')
-rw-r--r--app/mailers/emails/projects.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 17ef8b41e79..a4b7b140169 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -56,12 +56,9 @@ module Emails
subject: @message.subject)
end
- def prometheus_alert_fired_email(project_id, user_id, alert_attributes)
- @project = ::Project.find(project_id)
- user = ::User.find(user_id)
-
- @alert = AlertManagement::Alert.new(alert_attributes.with_indifferent_access).present
- return unless @alert.parsed_payload.has_required_attributes?
+ def prometheus_alert_fired_email(project, user, alert)
+ @project = project
+ @alert = alert.present
subject_text = "Alert: #{@alert.email_title}"
mail(to: user.notification_email_for(@project.group), subject: subject(subject_text))