Welcome to mirror list, hosted at ThFree Co, Russian Federation.

notification_setting.rb « entities « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aa6112b440238c824fd260aecb11bb95c59ce1c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module API
  module Entities
    class NotificationSetting < Grape::Entity
      expose :level
      expose :events, if: ->(notification_setting, _) { notification_setting.custom? } do |setting|
        setting.email_events.index_with do |event_name|
          setting[event_name]
        end
      end
    end
  end
end