summaryrefslogtreecommitdiff
path: root/lib/api/notification_settings.rb
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-07-23 10:42:19 +0800
committerMark Chao <mchao@gitlab.com>2018-08-14 14:59:29 +0800
commit8411d1cffc05171e82d727d883f03e279c8e9e05 (patch)
treeb09d87417123465509e43306dbba0da3d2abf640 /lib/api/notification_settings.rb
parentbea52d827e895c9261b3b1e01980832832f7c82a (diff)
downloadgitlab-ce-8411d1cffc05171e82d727d883f03e279c8e9e05.tar.gz
Add email_events to replace EMAIL_EVENTS because it needs to be dynamic,
allowing override for EE.
Diffstat (limited to 'lib/api/notification_settings.rb')
-rw-r--r--lib/api/notification_settings.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/notification_settings.rb b/lib/api/notification_settings.rb
index 0266bf2f717..9c824d9953c 100644
--- a/lib/api/notification_settings.rb
+++ b/lib/api/notification_settings.rb
@@ -23,7 +23,7 @@ module API
params do
optional :level, type: String, desc: 'The global notification level'
optional :notification_email, type: String, desc: 'The email address to send notifications'
- NotificationSetting::EMAIL_EVENTS.each do |event|
+ NotificationSetting.email_events.each do |event|
optional event, type: Boolean, desc: 'Enable/disable this notification'
end
end
@@ -73,7 +73,7 @@ module API
end
params do
optional :level, type: String, desc: "The #{source_type} notification level"
- NotificationSetting::EMAIL_EVENTS.each do |event|
+ NotificationSetting.email_events(source_type.to_sym).each do |event|
optional event, type: Boolean, desc: 'Enable/disable this notification'
end
end