2018-10-23 05:49:45 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class UserPreferenceEntity < Grape::Entity
|
|
|
|
expose :issue_notes_filter
|
|
|
|
expose :merge_request_notes_filter
|
|
|
|
|
|
|
|
expose :notes_filters do |user_preference|
|
|
|
|
UserPreference.notes_filters
|
|
|
|
end
|
2018-11-05 07:30:14 -05:00
|
|
|
|
|
|
|
expose :default_notes_filter do |user_preference|
|
|
|
|
UserPreference::NOTES_FILTERS[:all_notes]
|
|
|
|
end
|
2018-10-23 05:49:45 -04:00
|
|
|
end
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
UserPreferenceEntity.prepend_if_ee('EE::UserPreferenceEntity')
|