Feature toggle API reports

This commit is contained in:
Matt-Yorkley
2021-09-06 16:51:19 +01:00
parent 97b22ec65d
commit b6c593d5a4

View File

@@ -78,7 +78,8 @@ Openfoodnetwork::Application.routes.draw do
end
end
get '/reports/:report_type(/:report_subtype)', to: 'reports#show'
get '/reports/:report_type(/:report_subtype)', to: 'reports#show',
constraints: lambda { |_| Flipper.enabled?(:api_reports) }
end
match '*path', to: redirect(path: "/api/v0/%{path}"), via: :all, constraints: { path: /(?!v[0-9]).+/ }