Sha256: 94c9d0fc3c0efe0475a5c23891f2e3289070aa05da694c5f9fa66032f863d9a4

Contents?: true

Size: 461 Bytes

Versions: 54

Compression:

Stored size: 461 Bytes

Contents

require 'flipper/api/action'
require 'flipper/api/v1/decorators/feature'

module Flipper
  module Api
    module V1
      module Actions
        class ClearFeature < Api::Action
          include FeatureNameFromRoute

          route %r{\A/features/(?<feature_name>.*)/clear/?\Z}

          def delete
            feature = flipper[feature_name]
            feature.clear
            json_response({}, 204)
          end
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
flipper-api-0.20.2 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.20.1 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.20.0 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.20.0.beta3 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.20.0.beta2 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.20.0.beta1 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.19.1 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.19.0 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.18.0 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.17.2 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.17.1 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.16.2 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.16.1 lib/flipper/api/v1/actions/clear_feature.rb
flipper-api-0.16.0 lib/flipper/api/v1/actions/clear_feature.rb