diff options
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 3435d1d6f11..c0970b4cd6c 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -169,36 +169,6 @@ module API expose :last_pipeline, using: Entities::PipelineBasic expose :variables, using: Entities::Variable end - - class ImpersonationToken < PersonalAccessToken - expose :impersonation - end - - class ImpersonationTokenWithToken < PersonalAccessTokenWithToken - expose :impersonation - end - - class FeatureGate < Grape::Entity - expose :key - expose :value - end - - class Feature < Grape::Entity - expose :name - expose :state - expose :gates, using: FeatureGate do |model| - model.gates.map do |gate| - value = model.gate_values[gate.key] - - # By default all gate values are populated. Only show relevant ones. - if (value.is_a?(Integer) && value.zero?) || (value.is_a?(Set) && value.empty?) - next - end - - { key: gate.key, value: value } - end.compact - end - end end end |