2018-12-13 13:39:08 +05:30
|
|
|
# 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
|
|
|
|
|
|
|
|
expose :default_notes_filter do |user_preference|
|
|
|
|
UserPreference::NOTES_FILTERS[:all_notes]
|
|
|
|
end
|
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
UserPreferenceEntity.prepend_if_ee('EE::UserPreferenceEntity')
|