debian-mirror-gitlab/app/serializers/feature_flag_summary_entity.rb

20 lines
411 B
Ruby
Raw Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
class FeatureFlagSummaryEntity < Grape::Entity
include RequestAwareEntity
expose :count do
expose :all do |project|
project.operations_feature_flags.count
end
expose :enabled do |project|
project.operations_feature_flags.enabled.count
end
expose :disabled do |project|
project.operations_feature_flags.disabled.count
end
end
end