debian-mirror-gitlab/app/serializers/feature_flag_summary_entity.rb
2021-01-03 14:25:43 +05:30

19 lines
411 B
Ruby

# 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