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

user_preference_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 24c5bccdeb9891d29bb2cf6e9ec20a7efb635fc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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

UserPreferenceEntity.prepend_mod_with('UserPreferenceEntity')