summaryrefslogtreecommitdiff
path: root/lib/api/features.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-03 13:35:26 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-03 16:39:08 +0200
commitcaca8f34ffb56aed98a7894c98af6c4d1a5de78f (patch)
tree4c2990913120c783649206ebfb097a519edd6644 /lib/api/features.rb
parent8dca091ff7f04bb92a7835ebeff783b7f0ef76cd (diff)
downloadgitlab-ce-zj-feature-gate-remove-http-api.tar.gz
Allow feature gate removal through the APIzj-feature-gate-remove-http-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.
Diffstat (limited to 'lib/api/features.rb')
-rw-r--r--lib/api/features.rb7
1 files changed, 7 insertions, 0 deletions
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