From caca8f34ffb56aed98a7894c98af6c4d1a5de78f Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Tue, 3 Apr 2018 13:35:26 +0200 Subject: Allow feature gate removal through the API Features could be listed and added through the api, now also removed. This was needed in the case of gitlab.com as the number of gates that were ever used just grows and cleaning up is hard. --- lib/api/features.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/api') diff --git a/lib/api/features.rb b/lib/api/features.rb index 9385c6ca174..11d848584d9 100644 --- a/lib/api/features.rb +++ b/lib/api/features.rb @@ -65,6 +65,13 @@ module API present feature, with: Entities::Feature, current_user: current_user end + + desc 'Remove the gate value for the given feature' + delete ':name' do + Feature.get(params[:name]).remove + + status 204 + end end end end -- cgit v1.2.3